@Override public boolean containsAll(Collection<?> c) { for (Object item : c) { if (!contains(item)) { return false; } } return true; }
@SuppressWarnings("checkstyle:equalshashcode") @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Set<?>) { return equalsSet((Set<?>) obj); } return false; }
boolean equalsSet(Set<?> that) { return this.size() == that.size() && that.containsAll(this); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof AbstractImmutableSet<?>) { // all our immutable set implementations have fast hashcode AbstractImmutableSet<?> that = (AbstractImmutableSet<?>) obj; if (hashCode() != that.hashCode()) { return false; } return equalsSet(that); } if (obj instanceof Set<?>) { return equalsSet((Set<?>) obj); } return false; }
boolean equalsSet(Set<?> that) { return this.size() == that.size() && that.containsAll(this); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof AbstractImmutableSet<?>) { // all our immutable set implementations have fast hashcode AbstractImmutableSet<?> that = (AbstractImmutableSet<?>) obj; if (hashCode() != that.hashCode()) { return false; } return equalsSet(that); } if (obj instanceof Set<?>) { return equalsSet((Set<?>) obj); } return false; }
@Override public boolean containsAll(Collection<?> c) { for (Object item : c) { if (!contains(item)) { return false; } } return true; }
@SuppressWarnings("checkstyle:equalshashcode") @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Set<?>) { return equalsSet((Set<?>) obj); } return false; }
boolean equalsSet(Set<?> that) { return this.size() == that.size() && that.containsAll(this); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof AbstractImmutableSet<?>) { // all our immutable set implementations have fast hashcode AbstractImmutableSet<?> that = (AbstractImmutableSet<?>) obj; if (hashCode() != that.hashCode()) { return false; } return equalsSet(that); } if (obj instanceof Set<?>) { return equalsSet((Set<?>) obj); } return false; }
@Override public boolean containsAll(Collection<?> c) { for (Object item : c) { if (!contains(item)) { return false; } } return true; }
@SuppressWarnings("checkstyle:equalshashcode") @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Set<?>) { return equalsSet((Set<?>) obj); } return false; }
boolean equalsSet(Set<?> that) { return this.size() == that.size() && that.containsAll(this); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof AbstractImmutableSet<?>) { // all our immutable set implementations have fast hashcode AbstractImmutableSet<?> that = (AbstractImmutableSet<?>) obj; if (hashCode() != that.hashCode()) { return false; } return equalsSet(that); } if (obj instanceof Set<?>) { return equalsSet((Set<?>) obj); } return false; }
@Override public boolean containsAll(Collection<?> c) { for (Object item : c) { if (!contains(item)) { return false; } } return true; }
@SuppressWarnings("checkstyle:equalshashcode") @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Set<?>) { return equalsSet((Set<?>) obj); } return false; }
boolean equalsSet(Set<?> that) { return this.size() == that.size() && that.containsAll(this); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof AbstractImmutableSet<?>) { // all our immutable set implementations have fast hashcode AbstractImmutableSet<?> that = (AbstractImmutableSet<?>) obj; if (hashCode() != that.hashCode()) { return false; } return equalsSet(that); } if (obj instanceof Set<?>) { return equalsSet((Set<?>) obj); } return false; }
@Override public boolean containsAll(Collection<?> c) { for (Object item : c) { if (!contains(item)) { return false; } } return true; }
@SuppressWarnings("checkstyle:equalshashcode") @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Set<?>) { return equalsSet((Set<?>) obj); } return false; }