public abstract class AbstractSet<E> extends AbstractCollection<E> implements Set<E>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSet()
Constructs a new instance of this AbstractSet.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object)
Compares the specified object to this Set and returns true if they are
equal.
|
int |
hashCode()
Returns the hash code for this set.
|
boolean |
removeAll(Collection<?> collection)
Removes all occurrences in this collection which are contained in the
specified collection.
|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, retainAll, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, clear, contains, containsAll, copyOf, isEmpty, iterator, of, of, of, of, of, of, of, of, of, of, of, of, remove, retainAll, size, spliterator, toArray, toArrayforEach, parallelStream, removeIf, stream, toArrayprotected AbstractSet()
public boolean equals(Object object)
equals in interface Collection<E>equals in interface Set<E>equals in class Objectobject - the object to compare with this set.true if the specified object is equal to this set,
false otherwisehashCode()public int hashCode()
hashCode in interface Collection<E>hashCode in interface Set<E>hashCode in class Objectequals(java.lang.Object)public boolean removeAll(Collection<?> collection)
removeAll in interface Collection<E>removeAll in interface Set<E>removeAll in class AbstractCollection<E>collection - the collection of objects to remove.true if this collection was modified, false
otherwise.UnsupportedOperationException - if removing from this collection is not supported.Collection.remove(Object),
Collection.contains(Object)