diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-10-31 12:45:15 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-10-31 12:45:15 -0400 |
| commit | d5eaaa14adc980e9b0588a3caf7ee7d81df1183e (patch) | |
| tree | 866603edc90f0e1538e869db8a7732ce8c4bf03c /src/main/java/bjc/everge/ReplPairOptions.java | |
| parent | e8b01037e47884c10d9f910192ac59cef14d28bf (diff) | |
General cleanup
This does a bunch of structural cleanups to make the code better
Diffstat (limited to 'src/main/java/bjc/everge/ReplPairOptions.java')
| -rw-r--r-- | src/main/java/bjc/everge/ReplPairOptions.java | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/src/main/java/bjc/everge/ReplPairOptions.java b/src/main/java/bjc/everge/ReplPairOptions.java new file mode 100644 index 0000000..2c4062f --- /dev/null +++ b/src/main/java/bjc/everge/ReplPairOptions.java @@ -0,0 +1,91 @@ +package bjc.everge; + +import java.io.PrintStream; + +/** + * Options for processing ReplPairs. + * + * @author Ben Culkin. + */ +public class ReplPairOptions { + /** The default priority. */ + public int defaultPriority = 0; + + /** The default stage. */ + public int defaultStage = 0; + + /** + * Whether to process multi-line defns. + */ + public boolean defaultMulti = false; + + /** + * Default status. + */ + public StageStatus defaultStatus = StageStatus.BOTH; + + /** + * Enable debug info. + */ + public boolean isDebug = true; + + /** + * Enable trace info. + */ + public boolean isTrace = false; + + /** + * Enable performance info. + */ + public boolean isPerf = false; + + /** + * The stream to print normal output on. + */ + public PrintStream outStream = System.out; + + /** + * The stream to print error output on. + */ + public PrintStream errStream = System.err; + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + (defaultMulti ? 1231 : 1237); + result = prime * result + defaultPriority; + result = prime * result + defaultStage; + result = prime * result + ((defaultStatus == null) ? 0 : defaultStatus.hashCode()); + result = prime * result + (isDebug ? 1231 : 1237); + result = prime * result + (isPerf ? 1231 : 1237); + result = prime * result + (isTrace ? 1231 : 1237); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ReplPairOptions other = (ReplPairOptions) obj; + if (defaultMulti != other.defaultMulti) + return false; + if (defaultPriority != other.defaultPriority) + return false; + if (defaultStage != other.defaultStage) + return false; + if (defaultStatus != other.defaultStatus) + return false; + if (isDebug != other.isDebug) + return false; + if (isPerf != other.isPerf) + return false; + if (isTrace != other.isTrace) + return false; + return true; + } +} |
