public class KeyCollectionAsSet<E> extends CollectionAsSet<E> implements java.io.Serializable
| Constructor and Description |
|---|
KeyCollectionAsSet(KeyCollectionImpl<E> coll,
boolean immutable) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e)
Adds the specified element to this set if it is not already present
(optional operation).
|
boolean |
addAll(java.util.Collection<? extends E> c)
Adds all of the elements in the specified collection to this set if
they're not already present (optional operation).
|
public KeyCollectionAsSet(KeyCollectionImpl<E> coll, boolean immutable)
public boolean add(E e)
java.util.SetThe stipulation above does not imply that sets must accept all
elements; sets may refuse to add any particular element, including
null, and throw an exception, as described in the
specification for Collection.add.
Individual set implementations should clearly document any
restrictions on the elements that they may contain.
add in interface java.util.Collection<E>add in interface java.util.Set<E>add in class CollectionAsSet<E>e - element to be added to this setpublic boolean addAll(java.util.Collection<? extends E> c)
java.util.SetaddAll in interface java.util.Collection<E>addAll in interface java.util.Set<E>addAll in class CollectionAsSet<E>c - collection containing elements to be added to this setSet.add(Object)