@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new Object()) .addEqualityGroup( OBJ, OBJ, new StandardCommunityHighLowExprs(new LiteralInt(1), new LiteralInt(1))) .addEqualityGroup(new StandardCommunityHighLowExprs(new LiteralInt(1), new LiteralInt(2))) .addEqualityGroup(new StandardCommunityHighLowExprs(new LiteralInt(2), new LiteralInt(2))) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof StandardCommunityHighLowExprs)) { return false; } StandardCommunityHighLowExprs rhs = (StandardCommunityHighLowExprs) obj; return _highExpr.equals(rhs._highExpr) && _lowExpr.equals(rhs._lowExpr); }
StandardCommunityHighLowExprs extends CommunityExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof StandardCommunityHighLowExprs)) { return false; } StandardCommunityHighLowExprs rhs = (StandardCommunityHighLowExprs) obj; return _highExpr.equals(rhs._highExpr) && _lowExpr.equals(rhs._lowExpr); } }
StandardCommunityHighLowExprs extends CommunityExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof StandardCommunityHighLowExprs)) { return false; } StandardCommunityHighLowExprs rhs = (StandardCommunityHighLowExprs) obj; return _highExpr.equals(rhs._highExpr) && _lowExpr.equals(rhs._lowExpr); } StandardCommunityHighLowExprs(IntExpr highExpr, IntExpr lowExpr); }
StandardCommunityHighLowExprs extends CommunityExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof StandardCommunityHighLowExprs)) { return false; } StandardCommunityHighLowExprs rhs = (StandardCommunityHighLowExprs) obj; return _highExpr.equals(rhs._highExpr) && _lowExpr.equals(rhs._lowExpr); } StandardCommunityHighLowExprs(IntExpr highExpr, IntExpr lowExpr); @Override T accept(CommunityExprVisitor<T, U> visitor, U arg); @JsonProperty(PROP_HIGH_EXPR) @Nonnull IntExpr getHighExpr(); @JsonProperty(PROP_LOW_EXPR) @Nonnull IntExpr getLowExpr(); @Override boolean equals(Object obj); @Override int hashCode(); }
StandardCommunityHighLowExprs extends CommunityExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof StandardCommunityHighLowExprs)) { return false; } StandardCommunityHighLowExprs rhs = (StandardCommunityHighLowExprs) obj; return _highExpr.equals(rhs._highExpr) && _lowExpr.equals(rhs._lowExpr); } StandardCommunityHighLowExprs(IntExpr highExpr, IntExpr lowExpr); @Override T accept(CommunityExprVisitor<T, U> visitor, U arg); @JsonProperty(PROP_HIGH_EXPR) @Nonnull IntExpr getHighExpr(); @JsonProperty(PROP_LOW_EXPR) @Nonnull IntExpr getLowExpr(); @Override boolean equals(Object obj); @Override int hashCode();  }