|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.andrewoma.dexx.collection.internal.base.AbstractTraversable<E>
com.github.andrewoma.dexx.collection.internal.base.AbstractIterable<E>
com.github.andrewoma.dexx.collection.internal.base.AbstractSet<E>
com.github.andrewoma.dexx.collection.HashSet<E>
public class HashSet<E>
HashSet is an implementation of Set backed by a HashMap.
| Method Summary | ||
|---|---|---|
HashSet<E> |
add(E value)
Returns a set that adds the specified value if it doesn't already exist in this set. |
|
boolean |
contains(E value)
Returns true if the value exists in this set. |
|
static
|
empty()
|
|
static
|
factory()
|
|
|
forEach(Function<E,U> f)
All collection methods can be built upon this forEach definition. |
|
Iterator<E> |
iterator()
|
|
HashSet<E> |
remove(E value)
Removes the specified value from the set if it exists. |
|
int |
size()
Returns the size of the collection. |
|
| Methods inherited from class com.github.andrewoma.dexx.collection.internal.base.AbstractSet |
|---|
asSet, equals, hashCode |
| Methods inherited from class com.github.andrewoma.dexx.collection.internal.base.AbstractTraversable |
|---|
isEmpty, makeString, makeString, to, toArray, toArray, toIndexedList, toSet, toSortedSet, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.github.andrewoma.dexx.collection.Traversable |
|---|
isEmpty, makeString, makeString, to, toArray, toArray, toIndexedList, toSet, toSortedSet |
| Method Detail |
|---|
@NotNull public static <E> BuilderFactory<E,HashSet<E>> factory()
@NotNull public static <E> HashSet<E> empty()
@NotNull public HashSet<E> add(E value)
Set
@NotNull public HashSet<E> remove(E value)
Set
public boolean contains(E value)
Set
public int size()
TraversableWarning: infinite collections are possible, as are collections that require traversal to calculate the size.
size in interface Traversable<E>size in class AbstractTraversable<E>
public <U> void forEach(@NotNull
Function<E,U> f)
TraversableforEach definition.
forEach in interface Traversable<E>forEach in class AbstractIterable<E>@NotNull public Iterator<E> iterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||