diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2019-06-18 17:44:32 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2019-06-18 17:44:32 -0400 |
| commit | d86cbcbabc4b251956bd2c5bf4dfa459a00bb239 (patch) | |
| tree | 082ad1a1aa76d2519a3226bbaf2f190f6aa931a9 /src/main/java/bjc/everge/ReplOpts.java | |
| parent | 1e01c5df99434be2e44bcac1d6c79486082935b1 (diff) | |
Lots of frontend work
Diffstat (limited to 'src/main/java/bjc/everge/ReplOpts.java')
| -rw-r--r-- | src/main/java/bjc/everge/ReplOpts.java | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/src/main/java/bjc/everge/ReplOpts.java b/src/main/java/bjc/everge/ReplOpts.java index aa836b0..1ddfc79 100644 --- a/src/main/java/bjc/everge/ReplOpts.java +++ b/src/main/java/bjc/everge/ReplOpts.java @@ -1,5 +1,7 @@ package bjc.everge; +import java.io.PrintStream; + /** * Options for processing ReplPairs. * @@ -9,61 +11,60 @@ public class ReplOpts { /** * The default priority. */ - public int defPrior; + public int defPrior = 0; + /** * The default stage. */ - public int defStage; + public int defStage = 0; /** * Whether to process multi-line defns. */ - public boolean defMulti; + public boolean defMulti = false; /** * Default status. */ - public StageStatus defStatus; + public StageStatus defStatus = StageStatus.BOTH; /** * Enable debug info. */ - public boolean isDebug; + public boolean isDebug = true; /** - * Create a default set of options. + * Enable trace info. */ - public ReplOpts() { - defPrior = 0; - defStage = 0; + public boolean isTrace = false; - defMulti = false; + /** + * Enable performance info. + */ + public boolean isPerf = false; - defStatus = StageStatus.BOTH; + public PrintStream outStream = System.out; + public PrintStream errStream = System.err; - isDebug = false; - } + @Override + public boolean equals(Object o) { + if (o == null) return false; - /** - * Create a new set of repl. opts - * - * @param p - * The default priority to use - * @param s - * The default stage to use - * @param m - * Whether to process multi-line defns. - * @param t - * The default status. - */ - public ReplOpts(int p, int s, boolean m, StageStatus t, boolean d) { - defPrior = p; - defStage = s; + if (!getClass().equals(o.getClass())) return false; + + ReplOpts ro = (ReplOpts)o; + + if (isPerf != ro.isPerf) return false; + + if (isDebug != ro.isDebug) return false; + if (isTrace != ro.isTrace) return false; - defMulti = m; + if (defPrior != ro.defPrior) return false; + if (defStage != ro.defStage) return false; + if (defMulti != ro.defMulti) return false; - defStatus = t; + if (defStatus != ro.defStatus) return false; - isDebug = d; + return true; } } |
