public class ShortAVLTreeSet extends AbstractShortSet implements ShortNavigableSet
| Constructor and Description |
|---|
ShortAVLTreeSet()
Default Constructor
|
ShortAVLTreeSet(java.util.Collection<? extends java.lang.Short> collection)
Deprecated.
|
ShortAVLTreeSet(java.util.Collection<? extends java.lang.Short> collection,
ShortComparator comp)
Deprecated.
|
ShortAVLTreeSet(java.util.Iterator<java.lang.Short> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortAVLTreeSet(java.util.Iterator<java.lang.Short> iterator,
ShortComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortAVLTreeSet(short[] array)
Helper constructor that allow to create a set from an array
|
ShortAVLTreeSet(short[] array,
int offset,
int length)
Helper constructor that allow to create a set from an array
|
ShortAVLTreeSet(short[] array,
int offset,
int length,
ShortComparator comp)
Helper constructor that allow to create a set from an array
|
ShortAVLTreeSet(short[] array,
ShortComparator comp)
Helper constructor that allow to create a set from an array
|
ShortAVLTreeSet(ShortCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ShortAVLTreeSet(ShortCollection collection,
ShortComparator comp)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ShortAVLTreeSet(ShortComparator comp)
Constructor that allows to define the sorter
|
ShortAVLTreeSet(ShortIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortAVLTreeSet(ShortIterator iterator,
ShortComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortAVLTreeSet(ShortSortedSet 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(short o)
A Type-Specific add function to reduce (un)boxing
|
short |
ceiling(short e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
java.lang.Short |
ceiling(java.lang.Short e) |
void |
clear() |
ShortComparator |
comparator()
A Type Specific Comparator method
|
boolean |
contains(java.lang.Object e)
This default implementation delegates to the corresponding type-specific function.
|
boolean |
contains(short e)
A Type-Specific implementation of contains.
|
ShortAVLTreeSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
ShortBidirectionalIterator |
descendingIterator() |
ShortNavigableSet |
descendingSet() |
short |
findFirst(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
short |
firstShort()
A method to get the first element in the set
|
short |
floor(short e)
A Type Specific floor method to reduce boxing/unboxing.
|
java.lang.Short |
floor(java.lang.Short e) |
<E> void |
forEach(E input,
ObjectShortConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(ShortConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
short |
getDefaultMaxValue()
A Helper method to get the max value for SubSets.
|
short |
getDefaultMinValue()
A Helper method to get the min value for SubSets.
|
ShortNavigableSet |
headSet(short toElement,
boolean inclusive)
A Type Specific HeadSet method to reduce boxing/unboxing
|
short |
higher(short e)
A Type Specific higher method to reduce boxing/unboxing.
|
java.lang.Short |
higher(java.lang.Short e) |
ShortBidirectionalIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
ShortBidirectionalIterator |
iterator(short fromElement)
A type Specific Iterator starting from a given key
|
short |
lastShort()
A method to get the last element in the set
|
short |
lower(short e)
A Type Specific lower method to reduce boxing/unboxing.
|
java.lang.Short |
lower(java.lang.Short e) |
boolean |
matchesAll(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
short |
pollFirstShort()
A method to get and remove the first element in the set
|
short |
pollLastShort()
A method to get and remove the last element in the set
|
short |
reduce(short identity,
ShortShortUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
short |
reduce(ShortShortUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remove(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
boolean |
remove(short o)
A Type Specific remove function to reduce boxing/unboxing
|
void |
setDefaultMaxValue(short value)
A Helper method to set the max value for SubSets.
|
void |
setDefaultMinValue(short value)
A Helper method to set the min value for SubSets.
|
int |
size() |
ShortNavigableSet |
subSet(short fromElement,
boolean fromInclusive,
short toElement,
boolean toInclusive)
A Type Specific SubSet method to reduce boxing/unboxing
|
ShortNavigableSet |
tailSet(short fromElement,
boolean inclusive)
A Type Specific TailSet method to reduce boxing/unboxing
|
equals, hashCodeadd, addAll, addAll, containsAll, containsAll, containsAny, containsAny, removeAll, removeAll, remShort, retainAll, retainAll, toShortArray, toShortArrayisEmpty, 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, toShortArray, toShortArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, sortedpublic ShortAVLTreeSet()
public ShortAVLTreeSet(ShortComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic ShortAVLTreeSet(short[] array)
array - the elements that should be usedpublic ShortAVLTreeSet(short[] 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 ShortAVLTreeSet(short[] array,
ShortComparator comp)
array - the elements that should be usedcomp - the sorter of the tree, can be nullpublic ShortAVLTreeSet(short[] array,
int offset,
int length,
ShortComparator 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 ShortAVLTreeSet(ShortSortedSet sortedSet)
sortedSet - the set the elements should be added to the TreeSet@Deprecated public ShortAVLTreeSet(java.util.Collection<? extends java.lang.Short> collection)
collection - the set the elements should be added to the TreeSet@Deprecated
public ShortAVLTreeSet(java.util.Collection<? extends java.lang.Short> collection,
ShortComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic ShortAVLTreeSet(ShortCollection collection)
collection - the set the elements should be added to the TreeSetpublic ShortAVLTreeSet(ShortCollection collection, ShortComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic ShortAVLTreeSet(java.util.Iterator<java.lang.Short> iterator)
iterator - the elements that should be added to the setpublic ShortAVLTreeSet(java.util.Iterator<java.lang.Short> iterator,
ShortComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic ShortAVLTreeSet(ShortIterator iterator)
iterator - the elements that should be added to the setpublic ShortAVLTreeSet(ShortIterator iterator, ShortComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic void setDefaultMaxValue(short value)
ShortNavigableSetsetDefaultMaxValue in interface ShortNavigableSetvalue - the new max valuepublic short getDefaultMaxValue()
ShortNavigableSetgetDefaultMaxValue in interface ShortNavigableSetpublic void setDefaultMinValue(short value)
ShortNavigableSetsetDefaultMinValue in interface ShortNavigableSetvalue - the new min valuepublic short getDefaultMinValue()
ShortNavigableSetgetDefaultMinValue in interface ShortNavigableSetpublic boolean add(short o)
ShortCollectionadd in interface ShortCollectiono - the element that should be addedpublic short lower(short e)
ShortNavigableSetlower in interface ShortNavigableSete - that should be compared with.public short floor(short e)
ShortNavigableSetfloor in interface ShortNavigableSete - that should be compared with.public short higher(short e)
ShortNavigableSethigher in interface ShortNavigableSete - that should be compared with.public short ceiling(short e)
ShortNavigableSetceiling in interface ShortNavigableSete - that should be compared with.public java.lang.Short lower(java.lang.Short e)
lower in interface java.util.NavigableSet<java.lang.Short>lower in interface ShortNavigableSetpublic java.lang.Short floor(java.lang.Short e)
floor in interface java.util.NavigableSet<java.lang.Short>floor in interface ShortNavigableSetpublic java.lang.Short higher(java.lang.Short e)
higher in interface java.util.NavigableSet<java.lang.Short>higher in interface ShortNavigableSetpublic java.lang.Short ceiling(java.lang.Short e)
ceiling in interface java.util.NavigableSet<java.lang.Short>ceiling in interface ShortNavigableSetpublic void forEach(ShortConsumer action)
ShortIterableforEach in interface ShortIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectShortConsumer<E> action)
ShortIterableforEach in interface ShortIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Short2BooleanFunction filter)
ShortIterablematchesAny in interface ShortIterablefilter - that should be appliedpublic boolean matchesNone(Short2BooleanFunction filter)
ShortIterablematchesNone in interface ShortIterablefilter - that should be appliedpublic boolean matchesAll(Short2BooleanFunction filter)
ShortIterablematchesAll in interface ShortIterablefilter - that should be appliedpublic short findFirst(Short2BooleanFunction filter)
ShortIterablefindFirst in interface ShortIterablefilter - that should be appliedpublic short reduce(short identity,
ShortShortUnaryOperator operator)
ShortIterablereduce in interface ShortIterableidentity - the start valueoperator - the operation that should be appliedpublic short reduce(ShortShortUnaryOperator operator)
ShortIterablereduce in interface ShortIterableoperator - the operation that should be appliedpublic int count(Short2BooleanFunction filter)
ShortIterablecount in interface ShortIterablefilter - that should be appliedpublic boolean contains(short e)
AbstractShortCollectioncontains in interface ShortCollectioncontains in class AbstractShortCollectione - the element that should be searched for.public boolean contains(java.lang.Object e)
AbstractShortCollectionThis 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.Short>contains in interface java.util.Set<java.lang.Short>contains in interface ShortCollectioncontains in interface ShortSetcontains in class AbstractShortCollectionpublic short firstShort()
ShortSortedSetfirstShort in interface ShortSortedSetpublic short lastShort()
ShortSortedSetlastShort in interface ShortSortedSetpublic boolean remove(short o)
ShortSetpublic boolean remove(java.lang.Object o)
AbstractShortCollectionThis 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.Short>remove in interface java.util.Set<java.lang.Short>remove in interface ShortCollectionremove in interface ShortSetremove in class AbstractShortCollectionpublic short pollFirstShort()
ShortSortedSetpollFirstShort in interface ShortSortedSetpublic short pollLastShort()
ShortSortedSetpollLastShort in interface ShortSortedSetpublic int size()
size in interface java.util.Collection<java.lang.Short>size in interface java.util.Set<java.lang.Short>size in class java.util.AbstractCollection<java.lang.Short>public void clear()
clear in interface java.util.Collection<java.lang.Short>clear in interface java.util.Set<java.lang.Short>clear in class java.util.AbstractCollection<java.lang.Short>public ShortAVLTreeSet copy()
ShortCollectioncopy in interface ShortCollectioncopy in interface ShortNavigableSetcopy in interface ShortSetcopy in interface ShortSortedSetcopy in class AbstractShortSetpublic ShortComparator comparator()
ShortSortedSetcomparator in interface java.util.SortedSet<java.lang.Short>comparator in interface ShortSortedSetpublic ShortBidirectionalIterator iterator()
ShortCollectioniterator in interface java.lang.Iterable<java.lang.Short>iterator in interface java.util.Collection<java.lang.Short>iterator in interface java.util.NavigableSet<java.lang.Short>iterator in interface java.util.Set<java.lang.Short>iterator in interface ShortCollectioniterator in interface ShortIterableiterator in interface ShortNavigableSetiterator in interface ShortSetiterator in interface ShortSortedSetiterator in class AbstractShortSetCollection.iterator()public ShortBidirectionalIterator iterator(short fromElement)
ShortSortedSetiterator in interface ShortSortedSetfromElement - the element the iterator should start frompublic ShortBidirectionalIterator descendingIterator()
descendingIterator in interface java.util.NavigableSet<java.lang.Short>descendingIterator in interface ShortNavigableSetpublic ShortNavigableSet subSet(short fromElement, boolean fromInclusive, short toElement, boolean toInclusive)
ShortNavigableSetsubSet in interface ShortNavigableSetfromElement - where the SubSet should startfromInclusive - if the fromElement is inclusive or nottoElement - where the SubSet should endtoInclusive - if the toElement is inclusive or notpublic ShortNavigableSet headSet(short toElement, boolean inclusive)
ShortNavigableSetheadSet in interface ShortNavigableSettoElement - where the HeadSet should endinclusive - if the toElement is inclusive or notpublic ShortNavigableSet tailSet(short fromElement, boolean inclusive)
ShortNavigableSettailSet in interface ShortNavigableSetfromElement - where the TailSet should startinclusive - if the fromElement is inclusive or notpublic ShortNavigableSet descendingSet()
descendingSet in interface java.util.NavigableSet<java.lang.Short>descendingSet in interface ShortNavigableSet