T - the type of elements maintained by this Collectionpublic class ObjectLinkedOpenHashSet<T> extends ObjectOpenHashSet<T> implements ObjectOrderedSet<T>
| Constructor and Description |
|---|
ObjectLinkedOpenHashSet()
Default Constructor
|
ObjectLinkedOpenHashSet(java.util.Collection<? extends T> collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectLinkedOpenHashSet(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.
|
ObjectLinkedOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
ObjectLinkedOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
ObjectLinkedOpenHashSet(java.util.Iterator<T> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectLinkedOpenHashSet(java.util.Iterator<T> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectLinkedOpenHashSet(ObjectCollection<T> collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectLinkedOpenHashSet(ObjectCollection<T> collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectLinkedOpenHashSet(T[] array)
Helper constructor that allow to create a set from unboxed values
|
ObjectLinkedOpenHashSet(T[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ObjectLinkedOpenHashSet(T[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
ObjectLinkedOpenHashSet(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 |
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.
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
ObjectLinkedOpenHashSet<T> |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
T |
findFirst(Object2BooleanFunction<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.
|
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(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Object2BooleanFunction<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
|
add, addAll, addAll, addOrGet, contains, remove, size, trimequals, hashCodecontainsAll, containsAll, containsAny, containsAny, removeAll, removeAll, retainAll, retainAllisEmpty, removeAll, retainAll, toArray, toArray, toStringspliterator, synchronize, synchronize, unmodifiableadd, addAll, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayaddAll, addAll, addAll, addAll, containsAll, containsAny, containsAny, pour, removeAll, removeAll, retainAll, retainAll, toArrayarrayflatMap, asAsync, distinct, filter, flatMap, limit, map, peek, pourAsList, pourAsSet, sortedclearAndTrim, trimpublic ObjectLinkedOpenHashSet()
public ObjectLinkedOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic ObjectLinkedOpenHashSet(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectLinkedOpenHashSet(T[] array)
array - the elements that should be put into the setpublic ObjectLinkedOpenHashSet(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 ObjectLinkedOpenHashSet(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 ObjectLinkedOpenHashSet(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 ObjectLinkedOpenHashSet(java.util.Collection<? extends T> collection)
collection - the set the elements should be added to the Setpublic ObjectLinkedOpenHashSet(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 ObjectLinkedOpenHashSet(ObjectCollection<T> collection)
collection - the set the elements should be added to the Setpublic ObjectLinkedOpenHashSet(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 ObjectLinkedOpenHashSet(java.util.Iterator<T> iterator)
iterator - the elements that should be added to the setpublic ObjectLinkedOpenHashSet(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 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 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 void forEach(java.util.function.Consumer<? super T> action)
forEach in interface java.lang.Iterable<T>forEach in class ObjectOpenHashSet<T>public <E> void forEach(E input,
ObjectObjectConsumer<E,T> action)
ObjectIterableforEach in interface ObjectIterable<T>forEach in class ObjectOpenHashSet<T>E - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Object2BooleanFunction<T> filter)
ObjectIterablematchesAny in interface ObjectIterable<T>matchesAny in class ObjectOpenHashSet<T>filter - that should be appliedpublic boolean matchesNone(Object2BooleanFunction<T> filter)
ObjectIterablematchesNone in interface ObjectIterable<T>matchesNone in class ObjectOpenHashSet<T>filter - that should be appliedpublic boolean matchesAll(Object2BooleanFunction<T> filter)
ObjectIterablematchesAll in interface ObjectIterable<T>matchesAll in class ObjectOpenHashSet<T>filter - that should be appliedpublic <E> E reduce(E identity,
java.util.function.BiFunction<E,T,E> operator)
ObjectIterablereduce in interface ObjectIterable<T>reduce in class ObjectOpenHashSet<T>E - the type 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>reduce in class ObjectOpenHashSet<T>operator - the operation that should be appliedpublic T findFirst(Object2BooleanFunction<T> filter)
ObjectIterablefindFirst in interface ObjectIterable<T>findFirst in class ObjectOpenHashSet<T>filter - that should be appliedpublic int count(Object2BooleanFunction<T> filter)
ObjectIterablecount in interface ObjectIterable<T>count in class ObjectOpenHashSet<T>filter - that should be appliedpublic void clear()
clear in interface java.util.Collection<T>clear in interface java.util.Set<T>clear in class ObjectOpenHashSet<T>public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class ObjectOpenHashSet<T>size - the amount of elements that should be allowedpublic 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 ObjectOpenHashSet<T>Collection.iterator()public ObjectBidirectionalIterator<T> iterator(T fromElement)
ObjectOrderedSetiterator in interface ObjectOrderedSet<T>fromElement - the element the iterator should start frompublic ObjectLinkedOpenHashSet<T> copy()
ObjectCollectioncopy in interface ObjectCollection<T>copy in interface ObjectOrderedSet<T>copy in interface ObjectSet<T>copy in class ObjectOpenHashSet<T>