@Test public void testEquals() { new EqualsTester() .addEqualityGroup( LINE, LINE, new CommunityAclLine(LineAction.PERMIT, AllStandardCommunities.instance())) .addEqualityGroup(new CommunityAclLine(LineAction.DENY, AllStandardCommunities.instance())) .addEqualityGroup(new CommunityAclLine(LineAction.DENY, AllExtendedCommunities.instance())) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunityAclLine)) { return false; } CommunityAclLine rhs = (CommunityAclLine) obj; return _action == rhs._action && _communityMatchExpr.equals(rhs._communityMatchExpr); }
CommunityAclLine implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunityAclLine)) { return false; } CommunityAclLine rhs = (CommunityAclLine) obj; return _action == rhs._action && _communityMatchExpr.equals(rhs._communityMatchExpr); } }
CommunityAclLine implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunityAclLine)) { return false; } CommunityAclLine rhs = (CommunityAclLine) obj; return _action == rhs._action && _communityMatchExpr.equals(rhs._communityMatchExpr); } CommunityAclLine(LineAction action, CommunityMatchExpr communityMatchExpr); }
CommunityAclLine implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunityAclLine)) { return false; } CommunityAclLine rhs = (CommunityAclLine) obj; return _action == rhs._action && _communityMatchExpr.equals(rhs._communityMatchExpr); } CommunityAclLine(LineAction action, CommunityMatchExpr communityMatchExpr); @JsonProperty(PROP_ACTION) @Nonnull LineAction getAction(); @JsonProperty(PROP_COMMUNITY_MATCH_EXPR) @Nonnull CommunityMatchExpr getCommunityMatchExpr(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); }
CommunityAclLine implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunityAclLine)) { return false; } CommunityAclLine rhs = (CommunityAclLine) obj; return _action == rhs._action && _communityMatchExpr.equals(rhs._communityMatchExpr); } CommunityAclLine(LineAction action, CommunityMatchExpr communityMatchExpr); @JsonProperty(PROP_ACTION) @Nonnull LineAction getAction(); @JsonProperty(PROP_COMMUNITY_MATCH_EXPR) @Nonnull CommunityMatchExpr getCommunityMatchExpr(); @Override boolean equals(@Nullable Object obj); @Override int hashCode();  }