@Test public void testHashCode() { LineFunction2D f1 = new LineFunction2D(1.0, 2.0); LineFunction2D f2 = new LineFunction2D(1.0, 2.0); assertEquals(f1.hashCode(), f2.hashCode()); }
@Override public int hashCode() { int result = 29; result = HashUtilities.hashCode(result, this.a); result = HashUtilities.hashCode(result, this.b); return result; }
LineFunction2D implements Function2D, Serializable { @Override public int hashCode() { int result = 29; result = HashUtilities.hashCode(result, this.a); result = HashUtilities.hashCode(result, this.b); return result; } }
LineFunction2D implements Function2D, Serializable { @Override public int hashCode() { int result = 29; result = HashUtilities.hashCode(result, this.a); result = HashUtilities.hashCode(result, this.b); return result; } LineFunction2D(double a, double b); }
LineFunction2D implements Function2D, Serializable { @Override public int hashCode() { int result = 29; result = HashUtilities.hashCode(result, this.a); result = HashUtilities.hashCode(result, this.b); return result; } LineFunction2D(double a, double b); double getIntercept(); double getSlope(); @Override double getValue(double x); @Override boolean equals(Object obj); @Override int hashCode(); }
LineFunction2D implements Function2D, Serializable { @Override public int hashCode() { int result = 29; result = HashUtilities.hashCode(result, this.a); result = HashUtilities.hashCode(result, this.b); return result; } LineFunction2D(double a, double b); double getIntercept(); double getSlope(); @Override double getValue(double x); @Override boolean equals(Object obj); @Override int hashCode();  }