@Test public void testEquals() { ModuloAxis a1 = new ModuloAxis("Test", new Range(0.0, 1.0)); ModuloAxis a2 = new ModuloAxis("Test", new Range(0.0, 1.0)); assertEquals(a1, a2); a1.setDisplayRange(0.1, 1.1); assertFalse(a1.equals(a2)); a2.setDisplayRange(0.1, 1.1); assertEquals(a1, a2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ModuloAxis)) { return false; } ModuloAxis that = (ModuloAxis) obj; if (this.displayStart != that.displayStart) { return false; } if (this.displayEnd != that.displayEnd) { return false; } if (!this.fixedRange.equals(that.fixedRange)) { return false; } return super.equals(obj); }
ModuloAxis extends NumberAxis { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ModuloAxis)) { return false; } ModuloAxis that = (ModuloAxis) obj; if (this.displayStart != that.displayStart) { return false; } if (this.displayEnd != that.displayEnd) { return false; } if (!this.fixedRange.equals(that.fixedRange)) { return false; } return super.equals(obj); } }
ModuloAxis extends NumberAxis { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ModuloAxis)) { return false; } ModuloAxis that = (ModuloAxis) obj; if (this.displayStart != that.displayStart) { return false; } if (this.displayEnd != that.displayEnd) { return false; } if (!this.fixedRange.equals(that.fixedRange)) { return false; } return super.equals(obj); } ModuloAxis(String label, Range fixedRange); }
ModuloAxis extends NumberAxis { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ModuloAxis)) { return false; } ModuloAxis that = (ModuloAxis) obj; if (this.displayStart != that.displayStart) { return false; } if (this.displayEnd != that.displayEnd) { return false; } if (!this.fixedRange.equals(that.fixedRange)) { return false; } return super.equals(obj); } ModuloAxis(String label, Range fixedRange); double getDisplayStart(); double getDisplayEnd(); void setDisplayRange(double start, double end); @Override double valueToJava2D(double value, Rectangle2D area,
                                RectangleEdge edge); @Override double java2DToValue(double java2DValue, Rectangle2D area,
                                RectangleEdge edge); @Override void resizeRange(double percent); @Override void resizeRange(double percent, double anchorValue); @Override double lengthToJava2D(double length, Rectangle2D area,
                                 RectangleEdge edge); @Override boolean equals(Object obj); }
ModuloAxis extends NumberAxis { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ModuloAxis)) { return false; } ModuloAxis that = (ModuloAxis) obj; if (this.displayStart != that.displayStart) { return false; } if (this.displayEnd != that.displayEnd) { return false; } if (!this.fixedRange.equals(that.fixedRange)) { return false; } return super.equals(obj); } ModuloAxis(String label, Range fixedRange); double getDisplayStart(); double getDisplayEnd(); void setDisplayRange(double start, double end); @Override double valueToJava2D(double value, Rectangle2D area,
                                RectangleEdge edge); @Override double java2DToValue(double java2DValue, Rectangle2D area,
                                RectangleEdge edge); @Override void resizeRange(double percent); @Override void resizeRange(double percent, double anchorValue); @Override double lengthToJava2D(double length, Rectangle2D area,
                                 RectangleEdge edge); @Override boolean equals(Object obj);  }