public class ShortRBTreeSet extends AbstractShortSet implements ShortNavigableSet
| Constructor and Description |
|---|
ShortRBTreeSet()
Default Constructor
|
ShortRBTreeSet(java.util.Collection<? extends java.lang.Short> collection)
Deprecated.
|
ShortRBTreeSet(java.util.Collection<? extends java.lang.Short> collection,
ShortComparator comp)
Deprecated.
|
ShortRBTreeSet(java.util.Iterator<java.lang.Short> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortRBTreeSet(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
|
ShortRBTreeSet(short[] array)
Helper constructor that allow to create a set from an array
|
ShortRBTreeSet(short[] array,
int offset,
int length)
Helper constructor that allow to create a set from an array
|
ShortRBTreeSet(short[] array,
int offset,
int length,
ShortComparator comp)
Helper constructor that allow to create a set from an array
|
ShortRBTreeSet(short[] array,
ShortComparator comp)
Helper constructor that allow to create a set from an array
|
ShortRBTreeSet(ShortCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ShortRBTreeSet(ShortCollection collection,
ShortComparator comp)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ShortRBTreeSet(ShortComparator comp)
Constructor that allows to define the sorter
|
ShortRBTreeSet(ShortIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortRBTreeSet(ShortIterator iterator,
ShortComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortRBTreeSet(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
|
boolean |
addAndMoveToFirst(short o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(short o)
A customized add method that allows you to insert into the last index.
|
short |
ceiling(short e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
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.
|
ShortBidirectionalIterator |
descendingIterator() |
ShortNavigableSet |
descendingSet() |
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.
|
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.
|
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.
|
boolean |
moveToFirst(short o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(short o)
A specific move method to move a given key to the last index.
|
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
|
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, containsAny, containsAny, removeAll, remShort, retainAll, toShortArray, toShortArraycontainsAll, 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, toShortArray, toShortArrayforEach, forEachpublic ShortRBTreeSet()
public ShortRBTreeSet(ShortComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic ShortRBTreeSet(short[] array)
array - the elements that should be usedpublic ShortRBTreeSet(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 ShortRBTreeSet(short[] array,
ShortComparator comp)
array - the elements that should be usedcomp - the sorter of the tree, can be nullpublic ShortRBTreeSet(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 ShortRBTreeSet(ShortSortedSet sortedSet)
sortedSet - the set the elements should be added to the TreeSet@Deprecated public ShortRBTreeSet(java.util.Collection<? extends java.lang.Short> collection)
collection - the set the elements should be added to the TreeSet@Deprecated
public ShortRBTreeSet(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 ShortRBTreeSet(ShortCollection collection)
collection - the set the elements should be added to the TreeSetpublic ShortRBTreeSet(ShortCollection collection, ShortComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic ShortRBTreeSet(java.util.Iterator<java.lang.Short> iterator)
iterator - the elements that should be added to the setpublic ShortRBTreeSet(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 ShortRBTreeSet(ShortIterator iterator)
iterator - the elements that should be added to the setpublic ShortRBTreeSet(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 boolean addAndMoveToFirst(short o)
ShortSortedSetaddAndMoveToFirst in interface ShortSortedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(short o)
ShortSortedSetaddAndMoveToLast in interface ShortSortedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(short o)
ShortSortedSetmoveToFirst in interface ShortSortedSeto - that should be moved to the first indexpublic boolean moveToLast(short o)
ShortSortedSetmoveToLast in interface ShortSortedSeto - that should be moved to the first lastpublic 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 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 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