public abstract class AbstractSet extends AbstractCollection implements Set
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, toString
protected AbstractSet()
public boolean equals(Object object)
equals
in interface Collection
equals
in interface Set
equals
in class Object
object
- 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
hashCode
in interface Set
hashCode
in class Object
equals(java.lang.Object)
public boolean removeAll(Collection collection)
removeAll
in interface Collection
removeAll
in interface Set
removeAll
in class AbstractCollection
collection
- the collection of objects to remove.true
if this collection was modified, false
otherwise.UnsupportedOperationException
- if removing from this collection is not supported.