@Test public void testEqualsHashCode() { setupParameters(data, values); parameters.add(ff2.literal(InterpolateFunction.METHOD_COLOR)); Function fn1 = finder.findFunction("interpolate", parameters); Function fn2 = finder.findFunction("interpolate", parameters); setupParameters(data, values); parameters.add(ff2.literal(InterpolateFunction.METHOD_NUMERIC)); Function fn3 = finder.findFunction("interpolate", parameters); assertEquals(fn1, fn2); assertEquals(fn2, fn1); assertEquals(fn1.hashCode(), fn2.hashCode()); assertNotEquals(fn1, fn3); assertNotEquals(fn2, fn3); }
@Override public int hashCode() { return Objects.hash( mode, modeSpecified, method, methodSpecified, interpPoints, parameters, fallback); }
InterpolateFunction implements Function { @Override public int hashCode() { return Objects.hash( mode, modeSpecified, method, methodSpecified, interpPoints, parameters, fallback); } }
InterpolateFunction implements Function { @Override public int hashCode() { return Objects.hash( mode, modeSpecified, method, methodSpecified, interpPoints, parameters, fallback); } InterpolateFunction();  InterpolateFunction(List<Expression> parameters, Literal fallback); }
InterpolateFunction implements Function { @Override public int hashCode() { return Objects.hash( mode, modeSpecified, method, methodSpecified, interpPoints, parameters, fallback); } InterpolateFunction();  InterpolateFunction(List<Expression> parameters, Literal fallback); String getName(); FunctionName getFunctionName(); List<Expression> getParameters(); Object accept(ExpressionVisitor visitor, Object extraData); Object evaluate(Object object); T evaluate(Object object, Class<T> context); Literal getFallbackValue(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
InterpolateFunction implements Function { @Override public int hashCode() { return Objects.hash( mode, modeSpecified, method, methodSpecified, interpPoints, parameters, fallback); } InterpolateFunction();  InterpolateFunction(List<Expression> parameters, Literal fallback); String getName(); FunctionName getFunctionName(); List<Expression> getParameters(); Object accept(ExpressionVisitor visitor, Object extraData); Object evaluate(Object object); T evaluate(Object object, Class<T> context); Literal getFallbackValue(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static final String MODE_LINEAR; static final String MODE_COSINE; static final String MODE_CUBIC; static final String METHOD_NUMERIC; static final String METHOD_COLOR; static final String RASTER_DATA; static final FunctionName NAME; }