@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new Object()) .addEqualityGroup(OBJ, OBJ, new LiteralInt(1)) .addEqualityGroup(new LiteralInt(2)) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof LiteralInt)) { return false; } LiteralInt other = (LiteralInt) obj; return _value == other._value; }
LiteralInt extends IntExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof LiteralInt)) { return false; } LiteralInt other = (LiteralInt) obj; return _value == other._value; } }
LiteralInt extends IntExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof LiteralInt)) { return false; } LiteralInt other = (LiteralInt) obj; return _value == other._value; } LiteralInt(int value); }
LiteralInt extends IntExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof LiteralInt)) { return false; } LiteralInt other = (LiteralInt) obj; return _value == other._value; } LiteralInt(int value); @Override T accept(IntExprVisitor<T, U> visitor, U arg); @Override boolean equals(Object obj); @Override int evaluate(Environment environment); @JsonProperty(PROP_VALUE) int getValue(); @Override int hashCode(); void setValue(int value); }
LiteralInt extends IntExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof LiteralInt)) { return false; } LiteralInt other = (LiteralInt) obj; return _value == other._value; } LiteralInt(int value); @Override T accept(IntExprVisitor<T, U> visitor, U arg); @Override boolean equals(Object obj); @Override int evaluate(Environment environment); @JsonProperty(PROP_VALUE) int getValue(); @Override int hashCode(); void setValue(int value);  }