@Test public void testEquals() { new EqualsTester() .addEqualityGroup( EXPR, EXPR, new CommunitySetMatchRegex( new TypesFirstAscendingSpaceSeparated(IntegerValueRendering.instance()), "a")) .addEqualityGroup( new CommunitySetMatchRegex( new TypesFirstAscendingSpaceSeparated(ColonSeparatedRendering.instance()), "a")) .addEqualityGroup( new CommunitySetMatchRegex( new TypesFirstAscendingSpaceSeparated(ColonSeparatedRendering.instance()), "b")) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetMatchRegex)) { return false; } CommunitySetMatchRegex rhs = (CommunitySetMatchRegex) obj; return _communitySetRendering.equals(rhs._communitySetRendering) && _regex.equals(rhs._regex); }
CommunitySetMatchRegex extends CommunitySetMatchExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetMatchRegex)) { return false; } CommunitySetMatchRegex rhs = (CommunitySetMatchRegex) obj; return _communitySetRendering.equals(rhs._communitySetRendering) && _regex.equals(rhs._regex); } }
CommunitySetMatchRegex extends CommunitySetMatchExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetMatchRegex)) { return false; } CommunitySetMatchRegex rhs = (CommunitySetMatchRegex) obj; return _communitySetRendering.equals(rhs._communitySetRendering) && _regex.equals(rhs._regex); } CommunitySetMatchRegex(CommunitySetRendering communitySetRendering, String regex); }
CommunitySetMatchRegex extends CommunitySetMatchExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetMatchRegex)) { return false; } CommunitySetMatchRegex rhs = (CommunitySetMatchRegex) obj; return _communitySetRendering.equals(rhs._communitySetRendering) && _regex.equals(rhs._regex); } CommunitySetMatchRegex(CommunitySetRendering communitySetRendering, String regex); @JsonProperty(PROP_COMMUNITY_SET_RENDERING) @Nonnull CommunitySetRendering getCommunitySetRendering(); @JsonProperty(PROP_REGEX) @Nonnull String getRegex(); @Override boolean equals(Object obj); @Override int hashCode(); @Override T accept(CommunitySetMatchExprVisitor<T, U> visitor, U arg); }
CommunitySetMatchRegex extends CommunitySetMatchExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetMatchRegex)) { return false; } CommunitySetMatchRegex rhs = (CommunitySetMatchRegex) obj; return _communitySetRendering.equals(rhs._communitySetRendering) && _regex.equals(rhs._regex); } CommunitySetMatchRegex(CommunitySetRendering communitySetRendering, String regex); @JsonProperty(PROP_COMMUNITY_SET_RENDERING) @Nonnull CommunitySetRendering getCommunitySetRendering(); @JsonProperty(PROP_REGEX) @Nonnull String getRegex(); @Override boolean equals(Object obj); @Override int hashCode(); @Override T accept(CommunitySetMatchExprVisitor<T, U> visitor, U arg);  }