public interface Set extends Collection
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
boolean |
equals(Object o)
Default object equality (is identity).
|
int |
hashCode()
The (default) object hashcode: for transient objects this is simply the
address of the instance in memory, for persistent objects it is the
address at which the instance was first created (maybe in a previous
activation of the VM).
|
boolean |
isEmpty() |
Iterator |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
boolean |
retainAll(Collection c) |
int |
size() |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
int size()
size
in interface Collection
boolean isEmpty()
isEmpty
in interface Collection
boolean contains(Object o) throws ClassCastException
contains
in interface Collection
ClassCastException
Iterator iterator()
iterator
in interface Collection
Object[] toArray() throws ArrayStoreException
toArray
in interface Collection
ArrayStoreException
Object[] toArray(Object[] a) throws ArrayStoreException
toArray
in interface Collection
ArrayStoreException
boolean add(Object o) throws UnsupportedOperationException, ClassCastException, IllegalArgumentException
add
in interface Collection
UnsupportedOperationException
ClassCastException
IllegalArgumentException
boolean remove(Object o) throws UnsupportedOperationException
remove
in interface Collection
UnsupportedOperationException
boolean containsAll(Collection c) throws ConcurrentModificationException
containsAll
in interface Collection
ConcurrentModificationException
boolean addAll(Collection c) throws UnsupportedOperationException, ClassCastException, IllegalArgumentException, ConcurrentModificationException
addAll
in interface Collection
UnsupportedOperationException
ClassCastException
IllegalArgumentException
ConcurrentModificationException
boolean retainAll(Collection c) throws UnsupportedOperationException, ConcurrentModificationException
retainAll
in interface Collection
UnsupportedOperationException
ConcurrentModificationException
boolean removeAll(Collection c) throws UnsupportedOperationException, ConcurrentModificationException
removeAll
in interface Collection
UnsupportedOperationException
ConcurrentModificationException
void clear() throws UnsupportedOperationException
clear
in interface Collection
UnsupportedOperationException
boolean equals(Object o)
Object
equals
in interface Collection
equals
in class Object
int hashCode()
Object
hashCode
in interface Collection
hashCode
in class Object