T - the keyType of elements maintained by this Collectionpublic class ImmutableObjectOpenHashSet<T> extends AbstractObjectSet<T> implements ObjectOrderedSet<T>
ISizeProvider.CollectionSize| Constructor and Description |
|---|
ImmutableObjectOpenHashSet(java.util.Collection<? extends T> collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ImmutableObjectOpenHashSet(java.util.Collection<? extends T> collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ImmutableObjectOpenHashSet(java.util.Iterator<T> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableObjectOpenHashSet(java.util.Iterator<T> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableObjectOpenHashSet(ObjectCollection<T> collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ImmutableObjectOpenHashSet(ObjectCollection<T> collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ImmutableObjectOpenHashSet(ObjectIterator<T> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableObjectOpenHashSet(ObjectIterator<T> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableObjectOpenHashSet(T[] array)
Helper constructor that allow to create a set from unboxed values
|
ImmutableObjectOpenHashSet(T[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ImmutableObjectOpenHashSet(T[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
ImmutableObjectOpenHashSet(T[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T o) |
boolean |
addAll(java.util.Collection<? extends T> c) |
boolean |
addAll(ObjectCollection<T> c)
A Type-Specific addAll function to reduce (un)boxing
|
boolean |
addAndMoveToFirst(T o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(T o)
A customized add method that allows you to insert into the last index.
|
T |
addOrGet(T o)
A Helper method that allows to add a element or getting the already present implement.
|
void |
clear() |
boolean |
contains(java.lang.Object o) |
ImmutableObjectOpenHashSet<T> |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(java.util.function.Predicate<T> filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
T |
findFirst(java.util.function.Predicate<T> filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
T |
first()
A method to get the first element in the set
|
void |
forEach(java.util.function.Consumer<? super T> action) |
<E> void |
forEach(E input,
ObjectObjectConsumer<E,T> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEachIndexed(IntObjectConsumer<T> action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
ObjectListIterator<T> |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
ObjectBidirectionalIterator<T> |
iterator(T fromElement)
A type Specific Iterator starting from a given key
|
T |
last()
A method to get the last element in the set
|
boolean |
matchesAll(java.util.function.Predicate<T> filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(java.util.function.Predicate<T> filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(java.util.function.Predicate<T> filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
boolean |
moveToFirst(T o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(T o)
A specific move method to move a given key to the last index.
|
T |
pollFirst()
A method to get and remove the first element in the set
|
T |
pollLast()
A method to get and remove the last element in the set
|
<E> E |
reduce(E identity,
java.util.function.BiFunction<E,T,E> operator)
Performs a reduction on the
elements of this Iterable
|
T |
reduce(ObjectObjectUnaryOperator<T,T> operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remove(java.lang.Object o) |
int |
size() |
equals, hashCodecontainsAll, containsAll, containsAny, containsAny, removeAll, removeAll, retainAll, retainAllisEmpty, removeAll, retainAll, toArray, toArray, toStringspliterator, synchronize, synchronize, unmodifiablecontainsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArrayaddAll, addAll, addAll, containsAll, containsAny, containsAny, pour, removeAll, removeAll, retainAll, retainAll, toArrayarrayflatMap, asAsync, distinct, filter, flatMap, limit, map, peek, pourAsList, pourAsSet, repeat, sortedofpublic ImmutableObjectOpenHashSet(T[] array)
array - the elements that should be put into the setpublic ImmutableObjectOpenHashSet(T[] array, float loadFactor)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ImmutableObjectOpenHashSet(T[] array, int offset, int length)
array - the elements that should be put into the setoffset - the starting index within the array that should be usedlength - the amount of elements used from the arrayjava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ImmutableObjectOpenHashSet(T[] array, int offset, int length, float loadFactor)
array - the elements that should be put into the setoffset - the starting index within the array that should be usedlength - the amount of elements used from the arrayloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ImmutableObjectOpenHashSet(java.util.Collection<? extends T> collection)
collection - the set the elements should be added to the Setpublic ImmutableObjectOpenHashSet(java.util.Collection<? extends T> collection, float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ImmutableObjectOpenHashSet(ObjectCollection<T> collection)
collection - the set the elements should be added to the Setpublic ImmutableObjectOpenHashSet(ObjectCollection<T> collection, float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ImmutableObjectOpenHashSet(java.util.Iterator<T> iterator)
iterator - the elements that should be added to the setpublic ImmutableObjectOpenHashSet(java.util.Iterator<T> iterator, float loadFactor)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ImmutableObjectOpenHashSet(ObjectIterator<T> iterator)
iterator - the elements that should be added to the setpublic ImmutableObjectOpenHashSet(ObjectIterator<T> iterator, float loadFactor)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public boolean add(T o)
public T addOrGet(T o)
ObjectSetpublic boolean addAll(java.util.Collection<? extends T> c)
public boolean addAll(ObjectCollection<T> c)
ObjectCollectionaddAll in interface ObjectCollection<T>addAll in class AbstractObjectCollection<T>c - the collection of elements that should be addedpublic boolean addAndMoveToFirst(T o)
ObjectOrderedSetaddAndMoveToFirst in interface ObjectOrderedSet<T>o - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(T o)
ObjectOrderedSetaddAndMoveToLast in interface ObjectOrderedSet<T>o - the element that should be insertedSet.add(Object)public boolean moveToFirst(T o)
ObjectOrderedSetmoveToFirst in interface ObjectOrderedSet<T>o - that should be moved to the first indexpublic boolean moveToLast(T o)
ObjectOrderedSetmoveToLast in interface ObjectOrderedSet<T>o - that should be moved to the first lastpublic boolean contains(java.lang.Object o)
public T first()
ObjectOrderedSetfirst in interface ObjectOrderedSet<T>public T pollFirst()
ObjectOrderedSetpollFirst in interface ObjectOrderedSet<T>public T last()
ObjectOrderedSetlast in interface ObjectOrderedSet<T>public T pollLast()
ObjectOrderedSetpollLast in interface ObjectOrderedSet<T>public boolean remove(java.lang.Object o)
public void forEach(java.util.function.Consumer<? super T> action)
forEach in interface java.lang.Iterable<T>public void forEachIndexed(IntObjectConsumer<T> action)
ObjectIterableforEachIndexed in interface ObjectIterable<T>action - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectObjectConsumer<E,T> action)
ObjectIterableforEach in interface ObjectIterable<T>E - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(java.util.function.Predicate<T> filter)
ObjectIterablematchesAny in interface ObjectIterable<T>filter - that should be appliedpublic boolean matchesNone(java.util.function.Predicate<T> filter)
ObjectIterablematchesNone in interface ObjectIterable<T>filter - that should be appliedpublic boolean matchesAll(java.util.function.Predicate<T> filter)
ObjectIterablematchesAll in interface ObjectIterable<T>filter - that should be appliedpublic <E> E reduce(E identity,
java.util.function.BiFunction<E,T,E> operator)
ObjectIterablereduce in interface ObjectIterable<T>E - the keyType of elements maintained by this Collectionidentity - the start valueoperator - the operation that should be appliedpublic T reduce(ObjectObjectUnaryOperator<T,T> operator)
ObjectIterablereduce in interface ObjectIterable<T>operator - the operation that should be appliedpublic T findFirst(java.util.function.Predicate<T> filter)
ObjectIterablefindFirst in interface ObjectIterable<T>filter - that should be appliedpublic int count(java.util.function.Predicate<T> filter)
ObjectIterablecount in interface ObjectIterable<T>filter - that should be appliedpublic ObjectListIterator<T> iterator()
ObjectCollectioniterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>iterator in interface java.util.Set<T>iterator in interface ObjectCollection<T>iterator in interface ObjectIterable<T>iterator in interface ObjectOrderedSet<T>iterator in interface ObjectSet<T>iterator in class AbstractObjectSet<T>Collection.iterator()public ObjectBidirectionalIterator<T> iterator(T fromElement)
ObjectOrderedSetiterator in interface ObjectOrderedSet<T>fromElement - the element the iterator should start frompublic ImmutableObjectOpenHashSet<T> copy()
ObjectCollectioncopy in interface ObjectCollection<T>copy in interface ObjectOrderedSet<T>copy in interface ObjectSet<T>copy in class AbstractObjectSet<T>public void clear()
public int size()
size in interface java.util.Collection<T>size in interface java.util.Set<T>size in interface ISizeProvidersize in class java.util.AbstractCollection<T>