public class LongOpenCustomHashSet extends AbstractLongSet implements ITrimmable
| Constructor and Description |
|---|
LongOpenCustomHashSet(java.util.Collection<? extends java.lang.Long> collection,
float loadFactor,
LongStrategy strategy)
Deprecated.
|
LongOpenCustomHashSet(java.util.Collection<? extends java.lang.Long> collection,
LongStrategy strategy)
Deprecated.
|
LongOpenCustomHashSet(int minCapacity,
float loadFactor,
LongStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
LongOpenCustomHashSet(int minCapacity,
LongStrategy strategy)
Constructor that defines the minimum capacity
|
LongOpenCustomHashSet(java.util.Iterator<java.lang.Long> iterator,
float loadFactor,
LongStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongOpenCustomHashSet(java.util.Iterator<java.lang.Long> iterator,
LongStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongOpenCustomHashSet(long[] array,
float loadFactor,
LongStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
LongOpenCustomHashSet(long[] array,
int offset,
int length,
float loadFactor,
LongStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
LongOpenCustomHashSet(long[] array,
int offset,
int length,
LongStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
LongOpenCustomHashSet(long[] array,
LongStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
LongOpenCustomHashSet(LongCollection collection,
float loadFactor,
LongStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
LongOpenCustomHashSet(LongCollection collection,
LongStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
LongOpenCustomHashSet(LongIterator iterator,
float loadFactor,
LongStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongOpenCustomHashSet(LongIterator iterator,
LongStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongOpenCustomHashSet(LongStrategy strategy)
Default Contstructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Long> c)
Deprecated.
|
boolean |
addAll(LongCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
boolean |
contains(long o)
A Type-Specific implementation of contains.
|
LongStrategy |
getStrategy()
Helper getter function to get the current strategy
|
LongIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
remove(long o)
A Type Specific remove function to reduce boxing/unboxing
|
int |
size() |
boolean |
trim(int size)
Trims the original collection down to the size of the current elements or the requested size depending which is bigger
|
equals, hashCodeadd, contains, containsAll, containsAny, containsAny, remLong, remove, removeAll, retainAll, toLongArray, toLongArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimadd, contains, remLong, remove, spliteratorcontainsAll, isEmpty, removeAll, retainAll, toArray, toArraycontainsAll, containsAny, containsAny, parallelPrimitiveStream, primitiveStream, remIf, removeAll, removeIf, retainAll, toLongArray, toLongArrayforEach, forEachpublic LongOpenCustomHashSet(LongStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic LongOpenCustomHashSet(int minCapacity,
LongStrategy strategy)
minCapacity - the minimum capacity the HashSet is allowed to be.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativepublic LongOpenCustomHashSet(int minCapacity,
float loadFactor,
LongStrategy strategy)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public LongOpenCustomHashSet(long[] array,
LongStrategy strategy)
array - the elements that should be put into the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic LongOpenCustomHashSet(long[] array,
float loadFactor,
LongStrategy strategy)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public LongOpenCustomHashSet(long[] array,
int offset,
int length,
LongStrategy strategy)
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 arraystrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic LongOpenCustomHashSet(long[] array,
int offset,
int length,
float loadFactor,
LongStrategy strategy)
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 resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.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 range@Deprecated
public LongOpenCustomHashSet(java.util.Collection<? extends java.lang.Long> collection,
LongStrategy strategy)
collection - the set the elements should be added to the Setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is null@Deprecated
public LongOpenCustomHashSet(java.util.Collection<? extends java.lang.Long> collection,
float loadFactor,
LongStrategy strategy)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public LongOpenCustomHashSet(LongCollection collection, LongStrategy strategy)
collection - the set the elements should be added to the Setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic LongOpenCustomHashSet(LongCollection collection, float loadFactor, LongStrategy strategy)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public LongOpenCustomHashSet(java.util.Iterator<java.lang.Long> iterator,
LongStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic LongOpenCustomHashSet(java.util.Iterator<java.lang.Long> iterator,
float loadFactor,
LongStrategy strategy)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public LongOpenCustomHashSet(LongIterator iterator, LongStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic LongOpenCustomHashSet(LongIterator iterator, float loadFactor, LongStrategy strategy)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public LongStrategy getStrategy()
public boolean add(long o)
LongCollectionadd in interface LongCollectiono - the element that should be added@Deprecated public boolean addAll(java.util.Collection<? extends java.lang.Long> c)
AbstractLongCollectionThis default implementation delegates to the corresponding type-specific function.
addAll in interface java.util.Collection<java.lang.Long>addAll in interface java.util.Set<java.lang.Long>addAll in class AbstractLongCollectionpublic boolean addAll(LongCollection c)
LongCollectionaddAll in interface LongCollectionaddAll in class AbstractLongCollectionc - the collection of elements that should be addedpublic boolean contains(long o)
AbstractLongCollectioncontains in interface LongCollectioncontains in class AbstractLongCollectiono - the element that should be searched for.public boolean remove(long o)
LongSetpublic boolean trim(int size)
ITrimmabletrim in interface ITrimmablesize - the requested trim size.public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmablesize - the amount of elements that should be allowedpublic LongIterator iterator()
LongCollectioniterator in interface java.lang.Iterable<java.lang.Long>iterator in interface java.util.Collection<java.lang.Long>iterator in interface java.util.Set<java.lang.Long>iterator in interface LongCollectioniterator in interface LongIterableiterator in interface LongSetiterator in class AbstractLongSetCollection.iterator()public void clear()
clear in interface java.util.Collection<java.lang.Long>clear in interface java.util.Set<java.lang.Long>clear in class java.util.AbstractCollection<java.lang.Long>public int size()
size in interface java.util.Collection<java.lang.Long>size in interface java.util.Set<java.lang.Long>size in class java.util.AbstractCollection<java.lang.Long>