public abstract class Set<E> extends Collection<E>
Modifier | Constructor and Description |
---|---|
protected |
Set()
Constructs a new instance of this AbstractSet.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object)
By default, equals isn't supported for sets or other collections, though subclasses can choose to override this
behavior if they want.
|
int |
hashCode()
Returns the hash code for this set.
|
boolean |
removeAll(Collection<E> 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
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the object to compare to this object.true
if the specified object is equal to this set, false
otherwise; though by default
this method throws an exception and developers generally shouldn't use equals on collectionspublic int hashCode()
hashCode
in class java.lang.Object
equals(java.lang.Object)
public boolean removeAll(Collection<E> collection)
removeAll
in class Collection<E>
collection
- the collection of objects to remove.true
if this collection was modified, false
otherwise.