@Test public void testEquals() { AsSet set = AsSet.of(1); new EqualsTester() .addEqualityGroup(set, set, AsSet.of(1)) .addEqualityGroup(AsSet.of(2)) .addEqualityGroup(confed(2)) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof AsSet)) { return false; } return Arrays.equals(_value, ((AsSet) o)._value) && _confederation == ((AsSet) o)._confederation; }
AsSet implements Serializable, Comparable<AsSet> { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof AsSet)) { return false; } return Arrays.equals(_value, ((AsSet) o)._value) && _confederation == ((AsSet) o)._confederation; } }
AsSet implements Serializable, Comparable<AsSet> { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof AsSet)) { return false; } return Arrays.equals(_value, ((AsSet) o)._value) && _confederation == ((AsSet) o)._confederation; } private  AsSet(long[] value, boolean confederation); }
AsSet implements Serializable, Comparable<AsSet> { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof AsSet)) { return false; } return Arrays.equals(_value, ((AsSet) o)._value) && _confederation == ((AsSet) o)._confederation; } private  AsSet(long[] value, boolean confederation); static AsSet empty(); static AsSet of(long value); static AsSet of(long... value); static AsSet confedEmpty(); static AsSet confed(long... value); @Override int compareTo(AsSet o); boolean containsAs(long asn); @Override boolean equals(@Nullable Object o); @VisibleForTesting @JsonProperty(PROP_ASNS) SortedSet<Long> getAsns(); @Override int hashCode(); @JsonIgnore boolean isEmpty(); @JsonProperty(PROP_CONFEDERATION) boolean isConfederationAsSet(); AsSet removePrivateAs(); int size(); @Override String toString(); }
AsSet implements Serializable, Comparable<AsSet> { @Override public boolean equals(@Nullable Object o) { if (o == this) { return true; } else if (!(o instanceof AsSet)) { return false; } return Arrays.equals(_value, ((AsSet) o)._value) && _confederation == ((AsSet) o)._confederation; } private  AsSet(long[] value, boolean confederation); static AsSet empty(); static AsSet of(long value); static AsSet of(long... value); static AsSet confedEmpty(); static AsSet confed(long... value); @Override int compareTo(AsSet o); boolean containsAs(long asn); @Override boolean equals(@Nullable Object o); @VisibleForTesting @JsonProperty(PROP_ASNS) SortedSet<Long> getAsns(); @Override int hashCode(); @JsonIgnore boolean isEmpty(); @JsonProperty(PROP_CONFEDERATION) boolean isConfederationAsSet(); AsSet removePrivateAs(); int size(); @Override String toString();  }