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
|
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.
|
long |
ceiling(long e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
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.
|
LongBidirectionalIterator |
descendingIterator() |
LongNavigableSet |
descendingSet() |
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.
|
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.
|
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.
|
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
|
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, containsAny, containsAny, remLong, removeAll, retainAll, toLongArray, toLongArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringceiling, first, floor, headSet, headSet, headSet, higher, last, lower, pollFirst, pollLast, spliterator, subSet, subSet, subSet, tailSet, tailSet, tailSetaddAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, primitiveStream, remIf, removeAll, removeIf, retainAll, toLongArray, toLongArrayforEach, forEachpublic 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 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 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 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 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