public class LongLinkedOpenHashSet extends LongOpenHashSet implements LongSortedSet
| Constructor and Description |
|---|
LongLinkedOpenHashSet()
Default Constructor
|
LongLinkedOpenHashSet(java.util.Collection<? extends java.lang.Long> collection)
Deprecated.
|
LongLinkedOpenHashSet(java.util.Collection<? extends java.lang.Long> collection,
float loadFactor)
Deprecated.
|
LongLinkedOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
LongLinkedOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
LongLinkedOpenHashSet(java.util.Iterator<java.lang.Long> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongLinkedOpenHashSet(java.util.Iterator<java.lang.Long> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongLinkedOpenHashSet(long[] array)
Helper constructor that allow to create a set from unboxed values
|
LongLinkedOpenHashSet(long[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
LongLinkedOpenHashSet(long[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
LongLinkedOpenHashSet(long[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
LongLinkedOpenHashSet(LongCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
LongLinkedOpenHashSet(LongCollection collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
LongLinkedOpenHashSet(LongIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongLinkedOpenHashSet(LongIterator iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAndMoveToFirst(long o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(long 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
|
LongComparator |
comparator()
A Type Specific Comparator method
|
long |
firstLong()
A method to get the first element in the set
|
LongSortedSet |
headSet(long toElement)
A Type Specific HeadSet method to reduce boxing/unboxing
|
LongListIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
LongBidirectionalIterator |
iterator(long fromElement)
A type Specific Iterator starting from a given key
|
long |
lastLong()
A method to get the last element in the set
|
boolean |
moveToFirst(long o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(long o)
A specific move method to move a given key to the last index.
|
long |
pollFirstLong()
A method to get and remove the first element in the set
|
long |
pollLastLong()
A method to get and remove the last element in the set
|
LongSortedSet |
subSet(long fromElement,
long toElement)
A Type Specific SubSet method to reduce boxing/unboxing
|
LongSortedSet |
tailSet(long fromElement)
A Type Specific TailSet method to reduce boxing/unboxing
|
add, addAll, addAll, contains, contains, remove, remove, size, trimequals, hashCodeadd, containsAll, containsAny, containsAny, remLong, removeAll, retainAll, toLongArray, toLongArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringfirst, headSet, last, spliterator, subSet, tailSetadd, contains, remLong, remove, removeadd, addAll, contains, containsAll, containsAny, containsAny, parallelPrimitiveStream, primitiveStream, remIf, removeAll, removeIf, retainAll, toLongArray, toLongArrayforEach, forEachaddAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, size, toArray, toArrayclearAndTrim, trimpublic LongLinkedOpenHashSet()
public LongLinkedOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic LongLinkedOpenHashSet(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 LongLinkedOpenHashSet(long[] array)
array - the elements that should be put into the setpublic LongLinkedOpenHashSet(long[] 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 LongLinkedOpenHashSet(long[] 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 LongLinkedOpenHashSet(long[] 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 range@Deprecated public LongLinkedOpenHashSet(java.util.Collection<? extends java.lang.Long> collection)
collection - the set the elements should be added to the Set@Deprecated
public LongLinkedOpenHashSet(java.util.Collection<? extends java.lang.Long> 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 LongLinkedOpenHashSet(LongCollection collection)
collection - the set the elements should be added to the Setpublic LongLinkedOpenHashSet(LongCollection 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 LongLinkedOpenHashSet(java.util.Iterator<java.lang.Long> iterator)
iterator - the elements that should be added to the setpublic LongLinkedOpenHashSet(java.util.Iterator<java.lang.Long> 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 LongLinkedOpenHashSet(LongIterator iterator)
iterator - the elements that should be added to the setpublic LongLinkedOpenHashSet(LongIterator 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(long o)
LongSortedSetaddAndMoveToFirst in interface LongSortedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(long o)
LongSortedSetaddAndMoveToLast in interface LongSortedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(long o)
LongSortedSetmoveToFirst in interface LongSortedSeto - that should be moved to the first indexpublic boolean moveToLast(long o)
LongSortedSetmoveToLast in interface LongSortedSeto - that should be moved to the first lastpublic long firstLong()
LongSortedSetfirstLong in interface LongSortedSetpublic long pollFirstLong()
LongSortedSetpollFirstLong in interface LongSortedSetpublic long lastLong()
LongSortedSetlastLong in interface LongSortedSetpublic long pollLastLong()
LongSortedSetpollLastLong in interface LongSortedSetpublic void clear()
clear in interface java.util.Collection<java.lang.Long>clear in interface java.util.Set<java.lang.Long>clear in class LongOpenHashSetpublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class LongOpenHashSetsize - the amount of elements that should be allowedpublic LongListIterator 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 interface LongSortedSetiterator in class LongOpenHashSetCollection.iterator()public LongBidirectionalIterator iterator(long fromElement)
LongSortedSetiterator in interface LongSortedSetfromElement - the element the iterator should start frompublic LongComparator comparator()
LongSortedSetcomparator in interface java.util.SortedSet<java.lang.Long>comparator in interface LongSortedSetpublic LongSortedSet subSet(long fromElement, long toElement)
LongSortedSetsubSet in interface LongSortedSetfromElement - where the SubSet should starttoElement - where the SubSet should endpublic LongSortedSet headSet(long toElement)
LongSortedSetheadSet in interface LongSortedSettoElement - where the HeadSet should endpublic LongSortedSet tailSet(long fromElement)
LongSortedSettailSet in interface LongSortedSetfromElement - where the TailSet should start