@Test public void testEquals() { RouteFilterLine rfl = new RouteFilterLine(LineAction.PERMIT, IpWildcard.parse("1.1.1.1"), new SubRange(30, 32)); new EqualsTester() .addEqualityGroup( rfl, rfl, new RouteFilterLine( LineAction.PERMIT, IpWildcard.parse("1.1.1.1"), new SubRange(30, 32))) .addEqualityGroup( new RouteFilterLine(LineAction.DENY, IpWildcard.parse("1.1.1.1"), new SubRange(30, 32))) .addEqualityGroup( new RouteFilterLine( LineAction.PERMIT, IpWildcard.parse("2.2.2.2"), new SubRange(30, 32))) .addEqualityGroup( new RouteFilterLine( LineAction.PERMIT, IpWildcard.parse("2.2.2.2"), new SubRange(29, 32))) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof RouteFilterLine)) { return false; } RouteFilterLine other = (RouteFilterLine) o; return Objects.equals(_action, other._action) && Objects.equals(_lengthRange, other._lengthRange) && Objects.equals(_ipWildcard, other._ipWildcard); }
RouteFilterLine implements Serializable { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof RouteFilterLine)) { return false; } RouteFilterLine other = (RouteFilterLine) o; return Objects.equals(_action, other._action) && Objects.equals(_lengthRange, other._lengthRange) && Objects.equals(_ipWildcard, other._ipWildcard); } }
RouteFilterLine implements Serializable { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof RouteFilterLine)) { return false; } RouteFilterLine other = (RouteFilterLine) o; return Objects.equals(_action, other._action) && Objects.equals(_lengthRange, other._lengthRange) && Objects.equals(_ipWildcard, other._ipWildcard); } RouteFilterLine(LineAction action, IpWildcard ipWildcard, SubRange lengthRange);  RouteFilterLine(LineAction action, Prefix prefix, SubRange lengthRange);  RouteFilterLine(LineAction action, PrefixRange prefixRange); }
RouteFilterLine implements Serializable { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof RouteFilterLine)) { return false; } RouteFilterLine other = (RouteFilterLine) o; return Objects.equals(_action, other._action) && Objects.equals(_lengthRange, other._lengthRange) && Objects.equals(_ipWildcard, other._ipWildcard); } RouteFilterLine(LineAction action, IpWildcard ipWildcard, SubRange lengthRange);  RouteFilterLine(LineAction action, Prefix prefix, SubRange lengthRange);  RouteFilterLine(LineAction action, PrefixRange prefixRange); @Override boolean equals(@Nullable Object o); @JsonProperty(PROP_ACTION) LineAction getAction(); @JsonProperty(PROP_LENGTH_RANGE) SubRange getLengthRange(); @JsonProperty(PROP_IP_WILDCARD) IpWildcard getIpWildcard(); @Override int hashCode(); @Override String toString(); }
RouteFilterLine implements Serializable { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof RouteFilterLine)) { return false; } RouteFilterLine other = (RouteFilterLine) o; return Objects.equals(_action, other._action) && Objects.equals(_lengthRange, other._lengthRange) && Objects.equals(_ipWildcard, other._ipWildcard); } RouteFilterLine(LineAction action, IpWildcard ipWildcard, SubRange lengthRange);  RouteFilterLine(LineAction action, Prefix prefix, SubRange lengthRange);  RouteFilterLine(LineAction action, PrefixRange prefixRange); @Override boolean equals(@Nullable Object o); @JsonProperty(PROP_ACTION) LineAction getAction(); @JsonProperty(PROP_LENGTH_RANGE) SubRange getLengthRange(); @JsonProperty(PROP_IP_WILDCARD) IpWildcard getIpWildcard(); @Override int hashCode(); @Override String toString(); static final RouteFilterLine PERMIT_ALL; }