Example usage for Java java.util Set fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | add(E e) Adds the specified element to this set if it is not already present (optional operation). |
boolean | addAll(Collection extends E> c) Adds all of the elements in the specified collection to this set if they're not already present (optional operation). |
void | clear() Removes all of the elements from this set (optional operation). |
boolean | contains(Object o) Returns true if this set contains the specified element. |
boolean | containsAll(Collection> c) Returns true if this set contains all of the elements of the specified collection. |
boolean | equals(Object o) Compares the specified object with this set for equality. |
void | forEach(Consumer super T> action) Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception. |
Class> | getClass() Returns the runtime class of this Object . |
int | hashCode() Returns the hash code value for this set. |
boolean | isEmpty() Returns true if this set contains no elements. |
Iterator | iterator() Returns an iterator over the elements in this set. |
void | notifyAll() Wakes up all threads that are waiting on this object's monitor. |
Stream | parallelStream() Returns a possibly parallel Stream with this collection as its source. |
boolean | remove(Object o) Removes the specified element from this set if it is present (optional operation). |
boolean | removeAll(Collection> c) Removes from this set all of its elements that are contained in the specified collection (optional operation). |
boolean | removeIf(Predicate super E> filter) Removes all of the elements of this collection that satisfy the given predicate. |
boolean | retainAll(Collection> c) Retains only the elements in this set that are contained in the specified collection (optional operation). |
int | size() Returns the number of elements in this set (its cardinality). |
Spliterator | spliterator() Creates a Spliterator over the elements in this set. |
Stream | stream() Returns a sequential Stream with this collection as its source. |
Object[] | toArray() Returns an array containing all of the elements in this set. |
T[] | toArray(T[] a) Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array. |
String | toString() Returns a string representation of the object. |
void | wait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
void | wait() Causes the current thread to wait until it is awakened, typically by being notified or interrupted. |