@Test public void testEquals() { new EqualsTester() .addEqualityGroup( OBJ, OBJ, CommunitySetUnion.of( new CommunitySetExprReference("a"), new CommunitySetExprReference("a"))) .addEqualityGroup( CommunitySetUnion.of( new CommunitySetExprReference("b"), new CommunitySetExprReference("a"))) .addEqualityGroup( CommunitySetUnion.of( new CommunitySetExprReference("b"), new CommunitySetExprReference("b"))) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetUnion)) { return false; } CommunitySetUnion rhs = (CommunitySetUnion) obj; return _exprs.equals(rhs._exprs); }
CommunitySetUnion extends CommunitySetExpr { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetUnion)) { return false; } CommunitySetUnion rhs = (CommunitySetUnion) obj; return _exprs.equals(rhs._exprs); } }
CommunitySetUnion extends CommunitySetExpr { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetUnion)) { return false; } CommunitySetUnion rhs = (CommunitySetUnion) obj; return _exprs.equals(rhs._exprs); } private  CommunitySetUnion(Set<CommunitySetExpr> exprs); }
CommunitySetUnion extends CommunitySetExpr { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetUnion)) { return false; } CommunitySetUnion rhs = (CommunitySetUnion) obj; return _exprs.equals(rhs._exprs); } private  CommunitySetUnion(Set<CommunitySetExpr> exprs); static @Nonnull CommunitySetUnion of(CommunitySetExpr... exprs); static @Nonnull CommunitySetUnion of(Iterable<CommunitySetExpr> exprs); @Override T accept(CommunitySetExprVisitor<T, U> visitor, U arg); @JsonIgnore @Nonnull Set<CommunitySetExpr> getExprs(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); }
CommunitySetUnion extends CommunitySetExpr { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetUnion)) { return false; } CommunitySetUnion rhs = (CommunitySetUnion) obj; return _exprs.equals(rhs._exprs); } private  CommunitySetUnion(Set<CommunitySetExpr> exprs); static @Nonnull CommunitySetUnion of(CommunitySetExpr... exprs); static @Nonnull CommunitySetUnion of(Iterable<CommunitySetExpr> exprs); @Override T accept(CommunitySetExprVisitor<T, U> visitor, U arg); @JsonIgnore @Nonnull Set<CommunitySetExpr> getExprs(); @Override boolean equals(@Nullable Object obj); @Override int hashCode();  }