@Test public void testEquals() { new EqualsTester() .addEqualityGroup( new CommunityHalvesExpr(new LiteralCommunityHalf(1), new LiteralCommunityHalf(2)), new CommunityHalvesExpr(new LiteralCommunityHalf(1), new LiteralCommunityHalf(2))) .addEqualityGroup( new CommunityHalvesExpr(new LiteralCommunityHalf(1), new LiteralCommunityHalf(3))) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunityHalvesExpr)) { return false; } CommunityHalvesExpr rhs = (CommunityHalvesExpr) obj; return _left.equals(rhs._left) && _right.equals(rhs._right); }
CommunityHalvesExpr extends CommunitySetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunityHalvesExpr)) { return false; } CommunityHalvesExpr rhs = (CommunityHalvesExpr) obj; return _left.equals(rhs._left) && _right.equals(rhs._right); } }
CommunityHalvesExpr extends CommunitySetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunityHalvesExpr)) { return false; } CommunityHalvesExpr rhs = (CommunityHalvesExpr) obj; return _left.equals(rhs._left) && _right.equals(rhs._right); } CommunityHalvesExpr(@Nonnull CommunityHalfExpr left, @Nonnull CommunityHalfExpr right); }
CommunityHalvesExpr extends CommunitySetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunityHalvesExpr)) { return false; } CommunityHalvesExpr rhs = (CommunityHalvesExpr) obj; return _left.equals(rhs._left) && _right.equals(rhs._right); } CommunityHalvesExpr(@Nonnull CommunityHalfExpr left, @Nonnull CommunityHalfExpr right); @Override T accept(CommunitySetExprVisitor<T> visitor); @Override void accept(VoidCommunitySetExprVisitor visitor); @Nonnull @Override Set<Community> asLiteralCommunities(@Nonnull Environment environment); @Override boolean dynamicMatchCommunity(); @Override boolean equals(Object obj); @JsonProperty(PROP_LEFT) @Nonnull CommunityHalfExpr getLeft(); @JsonProperty(PROP_RIGHT) @Nonnull CommunityHalfExpr getRight(); @Override int hashCode(); @Override boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate); @Override boolean matchCommunity(Environment environment, Community community); @Override boolean reducible(); @Override String toString(); }
CommunityHalvesExpr extends CommunitySetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunityHalvesExpr)) { return false; } CommunityHalvesExpr rhs = (CommunityHalvesExpr) obj; return _left.equals(rhs._left) && _right.equals(rhs._right); } CommunityHalvesExpr(@Nonnull CommunityHalfExpr left, @Nonnull CommunityHalfExpr right); @Override T accept(CommunitySetExprVisitor<T> visitor); @Override void accept(VoidCommunitySetExprVisitor visitor); @Nonnull @Override Set<Community> asLiteralCommunities(@Nonnull Environment environment); @Override boolean dynamicMatchCommunity(); @Override boolean equals(Object obj); @JsonProperty(PROP_LEFT) @Nonnull CommunityHalfExpr getLeft(); @JsonProperty(PROP_RIGHT) @Nonnull CommunityHalfExpr getRight(); @Override int hashCode(); @Override boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate); @Override boolean matchCommunity(Environment environment, Community community); @Override boolean reducible(); @Override String toString();  }