@Test public void testEqualsHashCode() { setupParameters(words, ints); Function fn1 = finder.findFunction("interpolate", parameters); Function fn2 = finder.findFunction("interpolate", parameters); setupParameters(words, new Integer[] {1, 2, 5}); 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( parameters, staticTable, fastLookup, lastKeyType, lastContextType, fallback); }
RecodeFunction implements Function { @Override public int hashCode() { return Objects.hash( parameters, staticTable, fastLookup, lastKeyType, lastContextType, fallback); } }
RecodeFunction implements Function { @Override public int hashCode() { return Objects.hash( parameters, staticTable, fastLookup, lastKeyType, lastContextType, fallback); } RecodeFunction();  RecodeFunction(List<Expression> parameters, Literal fallback); }
RecodeFunction implements Function { @Override public int hashCode() { return Objects.hash( parameters, staticTable, fastLookup, lastKeyType, lastContextType, fallback); } RecodeFunction();  RecodeFunction(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(); }
RecodeFunction implements Function { @Override public int hashCode() { return Objects.hash( parameters, staticTable, fastLookup, lastKeyType, lastContextType, fallback); } RecodeFunction();  RecodeFunction(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 FunctionName NAME; }