@Test public void testEquals() { new EqualsTester() .addEqualityGroup( LINE, LINE, new CommunitySetAclLine(LineAction.PERMIT, new CommunitySetMatchExprReference("a"))) .addEqualityGroup( new CommunitySetAclLine(LineAction.DENY, new CommunitySetMatchExprReference("a"))) .addEqualityGroup( new CommunitySetAclLine(LineAction.DENY, new CommunitySetMatchExprReference("b"))) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetAclLine)) { return false; } CommunitySetAclLine rhs = (CommunitySetAclLine) obj; return _action == rhs._action && _communitySetMatchExpr.equals(rhs._communitySetMatchExpr); }
CommunitySetAclLine implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetAclLine)) { return false; } CommunitySetAclLine rhs = (CommunitySetAclLine) obj; return _action == rhs._action && _communitySetMatchExpr.equals(rhs._communitySetMatchExpr); } }
CommunitySetAclLine implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetAclLine)) { return false; } CommunitySetAclLine rhs = (CommunitySetAclLine) obj; return _action == rhs._action && _communitySetMatchExpr.equals(rhs._communitySetMatchExpr); } CommunitySetAclLine(LineAction action, CommunitySetMatchExpr communitySetMatchExpr); }
CommunitySetAclLine implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetAclLine)) { return false; } CommunitySetAclLine rhs = (CommunitySetAclLine) obj; return _action == rhs._action && _communitySetMatchExpr.equals(rhs._communitySetMatchExpr); } CommunitySetAclLine(LineAction action, CommunitySetMatchExpr communitySetMatchExpr); @JsonProperty(PROP_ACTION) @Nonnull LineAction getAction(); @JsonProperty(PROP_COMMUNITY_SET_MATCH_EXPR) @Nonnull CommunitySetMatchExpr getCommunitySetMatchExpr(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); }
CommunitySetAclLine implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySetAclLine)) { return false; } CommunitySetAclLine rhs = (CommunitySetAclLine) obj; return _action == rhs._action && _communitySetMatchExpr.equals(rhs._communitySetMatchExpr); } CommunitySetAclLine(LineAction action, CommunitySetMatchExpr communitySetMatchExpr); @JsonProperty(PROP_ACTION) @Nonnull LineAction getAction(); @JsonProperty(PROP_COMMUNITY_SET_MATCH_EXPR) @Nonnull CommunitySetMatchExpr getCommunitySetMatchExpr(); @Override boolean equals(@Nullable Object obj); @Override int hashCode();  }