@Test public void testEquals() { LogFormat f1 = new LogFormat(10.0, "10", true); LogFormat f2 = new LogFormat(10.0, "10", true); assertEquals(f1, f2); f1 = new LogFormat(11.0, "10", true); assertFalse(f1.equals(f2)); f2 = new LogFormat(11.0, "10", true); assertEquals(f1, f2); f1 = new LogFormat(11.0, "11", true); assertFalse(f1.equals(f2)); f2 = new LogFormat(11.0, "11", true); assertEquals(f1, f2); f1 = new LogFormat(11.0, "11", false); assertFalse(f1.equals(f2)); f2 = new LogFormat(11.0, "11", false); assertEquals(f1, f2); f1.setExponentFormat(new DecimalFormat("0.000")); assertFalse(f1.equals(f2)); f2.setExponentFormat(new DecimalFormat("0.000")); assertEquals(f1, f2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LogFormat)) { return false; } LogFormat that = (LogFormat) obj; if (this.base != that.base) { return false; } if (!this.baseLabel.equals(that.baseLabel)) { return false; } if (this.baseLog != that.baseLog) { return false; } if (this.showBase != that.showBase) { return false; } if (!this.formatter.equals(that.formatter)) { return false; } return super.equals(obj); }
LogFormat extends NumberFormat { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LogFormat)) { return false; } LogFormat that = (LogFormat) obj; if (this.base != that.base) { return false; } if (!this.baseLabel.equals(that.baseLabel)) { return false; } if (this.baseLog != that.baseLog) { return false; } if (this.showBase != that.showBase) { return false; } if (!this.formatter.equals(that.formatter)) { return false; } return super.equals(obj); } }
LogFormat extends NumberFormat { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LogFormat)) { return false; } LogFormat that = (LogFormat) obj; if (this.base != that.base) { return false; } if (!this.baseLabel.equals(that.baseLabel)) { return false; } if (this.baseLog != that.baseLog) { return false; } if (this.showBase != that.showBase) { return false; } if (!this.formatter.equals(that.formatter)) { return false; } return super.equals(obj); } LogFormat();  LogFormat(double base, String baseLabel, boolean showBase);  LogFormat(double base, String baseLabel, String powerLabel,
            boolean showBase); }
LogFormat extends NumberFormat { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LogFormat)) { return false; } LogFormat that = (LogFormat) obj; if (this.base != that.base) { return false; } if (!this.baseLabel.equals(that.baseLabel)) { return false; } if (this.baseLog != that.baseLog) { return false; } if (this.showBase != that.showBase) { return false; } if (!this.formatter.equals(that.formatter)) { return false; } return super.equals(obj); } LogFormat();  LogFormat(double base, String baseLabel, boolean showBase);  LogFormat(double base, String baseLabel, String powerLabel,
            boolean showBase); NumberFormat getExponentFormat(); void setExponentFormat(NumberFormat format); @Override StringBuffer format(double number, StringBuffer toAppendTo,
            FieldPosition pos); @Override StringBuffer format(long number, StringBuffer toAppendTo,
            FieldPosition pos); @Override Number parse(String source, ParsePosition parsePosition); @Override boolean equals(Object obj); @Override Object clone(); }
LogFormat extends NumberFormat { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LogFormat)) { return false; } LogFormat that = (LogFormat) obj; if (this.base != that.base) { return false; } if (!this.baseLabel.equals(that.baseLabel)) { return false; } if (this.baseLog != that.baseLog) { return false; } if (this.showBase != that.showBase) { return false; } if (!this.formatter.equals(that.formatter)) { return false; } return super.equals(obj); } LogFormat();  LogFormat(double base, String baseLabel, boolean showBase);  LogFormat(double base, String baseLabel, String powerLabel,
            boolean showBase); NumberFormat getExponentFormat(); void setExponentFormat(NumberFormat format); @Override StringBuffer format(double number, StringBuffer toAppendTo,
            FieldPosition pos); @Override StringBuffer format(long number, StringBuffer toAppendTo,
            FieldPosition pos); @Override Number parse(String source, ParsePosition parsePosition); @Override boolean equals(Object obj); @Override Object clone();  }