public class LongAVLTreeSet extends AbstractLongSet implements LongNavigableSet
| Constructor and Description |
|---|
LongAVLTreeSet()
Default Constructor
|
LongAVLTreeSet(java.util.Collection<? extends java.lang.Long> collection)
Deprecated.
|
LongAVLTreeSet(java.util.Collection<? extends java.lang.Long> collection,
LongComparator comp)
Deprecated.
|
LongAVLTreeSet(java.util.Iterator<java.lang.Long> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongAVLTreeSet(java.util.Iterator<java.lang.Long> iterator,
LongComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongAVLTreeSet(long[] array)
Helper constructor that allow to create a set from an array
|
LongAVLTreeSet(long[] array,
int offset,
int length)
Helper constructor that allow to create a set from an array
|
LongAVLTreeSet(long[] array,
int offset,
int length,
LongComparator comp)
Helper constructor that allow to create a set from an array
|
LongAVLTreeSet(long[] array,
LongComparator comp)
Helper constructor that allow to create a set from an array
|
LongAVLTreeSet(LongCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
LongAVLTreeSet(LongCollection collection,
LongComparator comp)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
LongAVLTreeSet(LongComparator comp)
Constructor that allows to define the sorter
|
LongAVLTreeSet(LongIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongAVLTreeSet(LongIterator iterator,
LongComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongAVLTreeSet(LongSortedSet sortedSet)
A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long o)
A Type-Specific add function to reduce (un)boxing
|
long |
ceiling(long e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
java.lang.Long |
ceiling(java.lang.Long e) |
void |
clear() |
LongComparator |
comparator()
A Type Specific Comparator method
|
boolean |
contains(long e)
A Type-Specific implementation of contains.
|
boolean |
contains(java.lang.Object e)
This default implementation delegates to the corresponding type-specific function.
|
LongAVLTreeSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
LongBidirectionalIterator |
descendingIterator() |
LongNavigableSet |
descendingSet() |
long |
findFirst(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
long |
firstLong()
A method to get the first element in the set
|
long |
floor(long e)
A Type Specific floor method to reduce boxing/unboxing.
|
java.lang.Long |
floor(java.lang.Long e) |
<E> void |
forEach(E input,
ObjectLongConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(LongConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
long |
getDefaultMaxValue()
A Helper method to get the max value for SubSets.
|
long |
getDefaultMinValue()
A Helper method to get the min value for SubSets.
|
LongNavigableSet |
headSet(long toElement,
boolean inclusive)
A Type Specific HeadSet method to reduce boxing/unboxing
|
long |
higher(long e)
A Type Specific higher method to reduce boxing/unboxing.
|
java.lang.Long |
higher(java.lang.Long e) |
LongBidirectionalIterator |
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
|
long |
lower(long e)
A Type Specific lower method to reduce boxing/unboxing.
|
java.lang.Long |
lower(java.lang.Long e) |
boolean |
matchesAll(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
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
|
long |
reduce(long identity,
LongLongUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
long |
reduce(LongLongUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remove(long o)
A Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
void |
setDefaultMaxValue(long value)
A Helper method to set the max value for SubSets.
|
void |
setDefaultMinValue(long value)
A Helper method to set the min value for SubSets.
|
int |
size() |
LongNavigableSet |
subSet(long fromElement,
boolean fromInclusive,
long toElement,
boolean toInclusive)
A Type Specific SubSet method to reduce boxing/unboxing
|
LongNavigableSet |
tailSet(long fromElement,
boolean inclusive)
A Type Specific TailSet method to reduce boxing/unboxing
|
equals, hashCodeadd, addAll, addAll, containsAll, containsAll, containsAny, containsAny, remLong, removeAll, removeAll, retainAll, retainAll, toLongArray, toLongArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringfirst, headSet, headSet, headSet, last, pollFirst, pollLast, spliterator, subSet, subSet, subSet, synchronize, synchronize, tailSet, tailSet, tailSet, unmodifiableaddAll, addAll, addAll, addAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, primitiveStream, remIf, removeAll, removeAll, removeIf, retainAll, retainAll, toLongArray, toLongArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, sortedpublic LongAVLTreeSet()
public LongAVLTreeSet(LongComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic LongAVLTreeSet(long[] array)
array - the elements that should be usedpublic LongAVLTreeSet(long[] array,
int offset,
int length)
array - the elements that should be usedoffset - the starting index within the arraylength - the amount of elements that are within the arrayjava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic LongAVLTreeSet(long[] array,
LongComparator comp)
array - the elements that should be usedcomp - the sorter of the tree, can be nullpublic LongAVLTreeSet(long[] array,
int offset,
int length,
LongComparator comp)
array - the elements that should be usedoffset - the starting index within the arraylength - the amount of elements that are within the arraycomp - the sorter of the tree, can be nulljava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic LongAVLTreeSet(LongSortedSet sortedSet)
sortedSet - the set the elements should be added to the TreeSet@Deprecated public LongAVLTreeSet(java.util.Collection<? extends java.lang.Long> collection)
collection - the set the elements should be added to the TreeSet@Deprecated
public LongAVLTreeSet(java.util.Collection<? extends java.lang.Long> collection,
LongComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic LongAVLTreeSet(LongCollection collection)
collection - the set the elements should be added to the TreeSetpublic LongAVLTreeSet(LongCollection collection, LongComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic LongAVLTreeSet(java.util.Iterator<java.lang.Long> iterator)
iterator - the elements that should be added to the setpublic LongAVLTreeSet(java.util.Iterator<java.lang.Long> iterator,
LongComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic LongAVLTreeSet(LongIterator iterator)
iterator - the elements that should be added to the setpublic LongAVLTreeSet(LongIterator iterator, LongComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic void setDefaultMaxValue(long value)
LongNavigableSetsetDefaultMaxValue in interface LongNavigableSetvalue - the new max valuepublic long getDefaultMaxValue()
LongNavigableSetgetDefaultMaxValue in interface LongNavigableSetpublic void setDefaultMinValue(long value)
LongNavigableSetsetDefaultMinValue in interface LongNavigableSetvalue - the new min valuepublic long getDefaultMinValue()
LongNavigableSetgetDefaultMinValue in interface LongNavigableSetpublic boolean add(long o)
LongCollectionadd in interface LongCollectiono - the element that should be addedpublic long lower(long e)
LongNavigableSetlower in interface LongNavigableSete - that should be compared with.public long floor(long e)
LongNavigableSetfloor in interface LongNavigableSete - that should be compared with.public long higher(long e)
LongNavigableSethigher in interface LongNavigableSete - that should be compared with.public long ceiling(long e)
LongNavigableSetceiling in interface LongNavigableSete - that should be compared with.public java.lang.Long lower(java.lang.Long e)
lower in interface java.util.NavigableSet<java.lang.Long>lower in interface LongNavigableSetpublic java.lang.Long floor(java.lang.Long e)
floor in interface java.util.NavigableSet<java.lang.Long>floor in interface LongNavigableSetpublic java.lang.Long higher(java.lang.Long e)
higher in interface java.util.NavigableSet<java.lang.Long>higher in interface LongNavigableSetpublic java.lang.Long ceiling(java.lang.Long e)
ceiling in interface java.util.NavigableSet<java.lang.Long>ceiling in interface LongNavigableSetpublic void forEach(LongConsumer action)
LongIterableforEach in interface LongIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectLongConsumer<E> action)
LongIterableforEach in interface LongIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Long2BooleanFunction filter)
LongIterablematchesAny in interface LongIterablefilter - that should be appliedpublic boolean matchesNone(Long2BooleanFunction filter)
LongIterablematchesNone in interface LongIterablefilter - that should be appliedpublic boolean matchesAll(Long2BooleanFunction filter)
LongIterablematchesAll in interface LongIterablefilter - that should be appliedpublic long findFirst(Long2BooleanFunction filter)
LongIterablefindFirst in interface LongIterablefilter - that should be appliedpublic long reduce(long identity,
LongLongUnaryOperator operator)
LongIterablereduce in interface LongIterableidentity - the start valueoperator - the operation that should be appliedpublic long reduce(LongLongUnaryOperator operator)
LongIterablereduce in interface LongIterableoperator - the operation that should be appliedpublic int count(Long2BooleanFunction filter)
LongIterablecount in interface LongIterablefilter - that should be appliedpublic boolean contains(long e)
AbstractLongCollectioncontains in interface LongCollectioncontains in class AbstractLongCollectione - the element that should be searched for.public boolean contains(java.lang.Object e)
AbstractLongCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
contains in interface java.util.Collection<java.lang.Long>contains in interface java.util.Set<java.lang.Long>contains in interface LongCollectioncontains in interface LongSetcontains in class AbstractLongCollectionpublic long firstLong()
LongSortedSetfirstLong in interface LongSortedSetpublic long lastLong()
LongSortedSetlastLong in interface LongSortedSetpublic boolean remove(long o)
LongSetpublic boolean remove(java.lang.Object o)
AbstractLongCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Long>remove in interface java.util.Set<java.lang.Long>remove in interface LongCollectionremove in interface LongSetremove in class AbstractLongCollectionpublic long pollFirstLong()
LongSortedSetpollFirstLong in interface LongSortedSetpublic long pollLastLong()
LongSortedSetpollLastLong in interface LongSortedSetpublic 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>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 LongAVLTreeSet copy()
LongCollectioncopy in interface LongCollectioncopy in interface LongNavigableSetcopy in interface LongSetcopy in interface LongSortedSetcopy in class AbstractLongSetpublic LongComparator comparator()
LongSortedSetcomparator in interface java.util.SortedSet<java.lang.Long>comparator in interface LongSortedSetpublic LongBidirectionalIterator iterator()
LongCollectioniterator in interface java.lang.Iterable<java.lang.Long>iterator in interface java.util.Collection<java.lang.Long>iterator in interface java.util.NavigableSet<java.lang.Long>iterator in interface java.util.Set<java.lang.Long>iterator in interface LongCollectioniterator in interface LongIterableiterator in interface LongNavigableSetiterator in interface LongSetiterator in interface LongSortedSetiterator in class AbstractLongSetCollection.iterator()public LongBidirectionalIterator iterator(long fromElement)
LongSortedSetiterator in interface LongSortedSetfromElement - the element the iterator should start frompublic LongBidirectionalIterator descendingIterator()
descendingIterator in interface java.util.NavigableSet<java.lang.Long>descendingIterator in interface LongNavigableSetpublic LongNavigableSet subSet(long fromElement, boolean fromInclusive, long toElement, boolean toInclusive)
LongNavigableSetsubSet in interface LongNavigableSetfromElement - where the SubSet should startfromInclusive - if the fromElement is inclusive or nottoElement - where the SubSet should endtoInclusive - if the toElement is inclusive or notpublic LongNavigableSet headSet(long toElement, boolean inclusive)
LongNavigableSetheadSet in interface LongNavigableSettoElement - where the HeadSet should endinclusive - if the toElement is inclusive or notpublic LongNavigableSet tailSet(long fromElement, boolean inclusive)
LongNavigableSettailSet in interface LongNavigableSetfromElement - where the TailSet should startinclusive - if the fromElement is inclusive or notpublic LongNavigableSet descendingSet()
descendingSet in interface java.util.NavigableSet<java.lang.Long>descendingSet in interface LongNavigableSet