@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new Object()) .addEqualityGroup(OBJ, OBJ, new LongComparison(IntComparator.EQ, new LiteralLong(1L))) .addEqualityGroup(new LongComparison(IntComparator.GT, new LiteralLong(1L))) .addEqualityGroup(new LongComparison(IntComparator.GT, new LiteralLong(2L))) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LongComparison)) { return false; } LongComparison rhs = (LongComparison) obj; return _comparator == rhs._comparator && _expr.equals(rhs._expr); }
LongComparison extends LongMatchExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LongComparison)) { return false; } LongComparison rhs = (LongComparison) obj; return _comparator == rhs._comparator && _expr.equals(rhs._expr); } }
LongComparison extends LongMatchExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LongComparison)) { return false; } LongComparison rhs = (LongComparison) obj; return _comparator == rhs._comparator && _expr.equals(rhs._expr); } LongComparison(IntComparator comparator, LongExpr expr); }
LongComparison extends LongMatchExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LongComparison)) { return false; } LongComparison rhs = (LongComparison) obj; return _comparator == rhs._comparator && _expr.equals(rhs._expr); } LongComparison(IntComparator comparator, LongExpr expr); @Override T accept(LongMatchExprVisitor<T, U> visitor, U arg); @JsonProperty(PROP_COMPARATOR) @Nonnull IntComparator getComparator(); @JsonProperty(PROP_EXPR) @Nonnull LongExpr getExpr(); @Override boolean equals(Object obj); @Override int hashCode(); }
LongComparison extends LongMatchExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LongComparison)) { return false; } LongComparison rhs = (LongComparison) obj; return _comparator == rhs._comparator && _expr.equals(rhs._expr); } LongComparison(IntComparator comparator, LongExpr expr); @Override T accept(LongMatchExprVisitor<T, U> visitor, U arg); @JsonProperty(PROP_COMPARATOR) @Nonnull IntComparator getComparator(); @JsonProperty(PROP_EXPR) @Nonnull LongExpr getExpr(); @Override boolean equals(Object obj); @Override int hashCode();  }