public class IntRBTreeSet extends AbstractIntSet implements IntNavigableSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
IntRBTreeSet()
Default Constructor
|
IntRBTreeSet(java.util.Collection<? extends java.lang.Integer> collection)
Deprecated.
|
IntRBTreeSet(java.util.Collection<? extends java.lang.Integer> collection,
IntComparator comp)
Deprecated.
|
IntRBTreeSet(int[] array)
Helper constructor that allow to create a set from an array
|
IntRBTreeSet(int[] array,
IntComparator comp)
Helper constructor that allow to create a set from an array
|
IntRBTreeSet(int[] array,
int offset,
int length)
Helper constructor that allow to create a set from an array
|
IntRBTreeSet(int[] array,
int offset,
int length,
IntComparator comp)
Helper constructor that allow to create a set from an array
|
IntRBTreeSet(IntCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
IntRBTreeSet(IntCollection collection,
IntComparator comp)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
IntRBTreeSet(IntComparator comp)
Constructor that allows to define the sorter
|
IntRBTreeSet(IntIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntRBTreeSet(IntIterator iterator,
IntComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntRBTreeSet(IntSortedSet sortedSet)
A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.
|
IntRBTreeSet(java.util.Iterator<java.lang.Integer> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntRBTreeSet(java.util.Iterator<java.lang.Integer> iterator,
IntComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(int o)
A Type-Specific add function to reduce (un)boxing
|
int |
ceiling(int e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
java.lang.Integer |
ceiling(java.lang.Integer e) |
void |
clear() |
IntComparator |
comparator()
A Type Specific Comparator method
|
boolean |
contains(int e)
A Type-Specific implementation of contains.
|
boolean |
contains(java.lang.Object e)
This default implementation delegates to the corresponding type-specific function.
|
IntRBTreeSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
IntBidirectionalIterator |
descendingIterator() |
IntNavigableSet |
descendingSet() |
int |
findFirst(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
int |
firstInt()
A method to get the first element in the set
|
int |
floor(int e)
A Type Specific floor method to reduce boxing/unboxing.
|
java.lang.Integer |
floor(java.lang.Integer e) |
<E> void |
forEach(E input,
ObjectIntConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(IntConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
void |
forEachIndexed(IntIntConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
int |
getDefaultMaxValue()
A Helper method to get the max value for SubSets.
|
int |
getDefaultMinValue()
A Helper method to get the min value for SubSets.
|
IntNavigableSet |
headSet(int toElement,
boolean inclusive)
A Type Specific HeadSet method to reduce boxing/unboxing
|
int |
higher(int e)
A Type Specific higher method to reduce boxing/unboxing.
|
java.lang.Integer |
higher(java.lang.Integer e) |
IntBidirectionalIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
IntBidirectionalIterator |
iterator(int fromElement)
A type Specific Iterator starting from a given key
|
int |
lastInt()
A method to get the last element in the set
|
int |
lower(int e)
A Type Specific lower method to reduce boxing/unboxing.
|
java.lang.Integer |
lower(java.lang.Integer e) |
boolean |
matchesAll(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
int |
pollFirstInt()
A method to get and remove the first element in the set
|
int |
pollLastInt()
A method to get and remove the last element in the set
|
int |
reduce(int identity,
IntIntUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
int |
reduce(IntIntUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remove(int 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(int value)
A Helper method to set the max value for SubSets.
|
void |
setDefaultMinValue(int value)
A Helper method to set the min value for SubSets.
|
int |
size() |
IntNavigableSet |
subSet(int fromElement,
boolean fromInclusive,
int toElement,
boolean toInclusive)
A Type Specific SubSet method to reduce boxing/unboxing
|
IntNavigableSet |
tailSet(int fromElement,
boolean inclusive)
A Type Specific TailSet method to reduce boxing/unboxing
|
equals, hashCodeadd, addAll, addAll, containsAll, containsAll, containsAny, containsAny, remInt, removeAll, removeAll, retainAll, retainAll, toIntArray, toIntArrayisEmpty, 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, toIntArray, toIntArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedofpublic IntRBTreeSet()
public IntRBTreeSet(IntComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic IntRBTreeSet(int[] array)
array - the elements that should be usedpublic IntRBTreeSet(int[] 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 IntRBTreeSet(int[] array,
IntComparator comp)
array - the elements that should be usedcomp - the sorter of the tree, can be nullpublic IntRBTreeSet(int[] array,
int offset,
int length,
IntComparator 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 IntRBTreeSet(IntSortedSet sortedSet)
sortedSet - the set the elements should be added to the TreeSet@Deprecated public IntRBTreeSet(java.util.Collection<? extends java.lang.Integer> collection)
collection - the set the elements should be added to the TreeSet@Deprecated
public IntRBTreeSet(java.util.Collection<? extends java.lang.Integer> collection,
IntComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic IntRBTreeSet(IntCollection collection)
collection - the set the elements should be added to the TreeSetpublic IntRBTreeSet(IntCollection collection, IntComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic IntRBTreeSet(java.util.Iterator<java.lang.Integer> iterator)
iterator - the elements that should be added to the setpublic IntRBTreeSet(java.util.Iterator<java.lang.Integer> iterator,
IntComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic IntRBTreeSet(IntIterator iterator)
iterator - the elements that should be added to the setpublic IntRBTreeSet(IntIterator iterator, IntComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic void setDefaultMaxValue(int value)
IntNavigableSetsetDefaultMaxValue in interface IntNavigableSetvalue - the new max valuepublic int getDefaultMaxValue()
IntNavigableSetgetDefaultMaxValue in interface IntNavigableSetpublic void setDefaultMinValue(int value)
IntNavigableSetsetDefaultMinValue in interface IntNavigableSetvalue - the new min valuepublic int getDefaultMinValue()
IntNavigableSetgetDefaultMinValue in interface IntNavigableSetpublic boolean add(int o)
IntCollectionadd in interface IntCollectiono - the element that should be addedpublic int lower(int e)
IntNavigableSetlower in interface IntNavigableSete - that should be compared with.public int floor(int e)
IntNavigableSetfloor in interface IntNavigableSete - that should be compared with.public int higher(int e)
IntNavigableSethigher in interface IntNavigableSete - that should be compared with.public int ceiling(int e)
IntNavigableSetceiling in interface IntNavigableSete - that should be compared with.public java.lang.Integer lower(java.lang.Integer e)
lower in interface java.util.NavigableSet<java.lang.Integer>lower in interface IntNavigableSetpublic java.lang.Integer floor(java.lang.Integer e)
floor in interface java.util.NavigableSet<java.lang.Integer>floor in interface IntNavigableSetpublic java.lang.Integer higher(java.lang.Integer e)
higher in interface java.util.NavigableSet<java.lang.Integer>higher in interface IntNavigableSetpublic java.lang.Integer ceiling(java.lang.Integer e)
ceiling in interface java.util.NavigableSet<java.lang.Integer>ceiling in interface IntNavigableSetpublic void forEach(IntConsumer action)
IntIterableforEach in interface IntIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntIntConsumer action)
IntIterableforEachIndexed in interface IntIterableaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectIntConsumer<E> action)
IntIterableforEach in interface IntIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(java.util.function.IntPredicate filter)
IntIterablematchesAny in interface IntIterablefilter - that should be appliedpublic boolean matchesNone(java.util.function.IntPredicate filter)
IntIterablematchesNone in interface IntIterablefilter - that should be appliedpublic boolean matchesAll(java.util.function.IntPredicate filter)
IntIterablematchesAll in interface IntIterablefilter - that should be appliedpublic int reduce(int identity,
IntIntUnaryOperator operator)
IntIterablereduce in interface IntIterableidentity - the start valueoperator - the operation that should be appliedpublic int reduce(IntIntUnaryOperator operator)
IntIterablereduce in interface IntIterableoperator - the operation that should be appliedpublic int findFirst(java.util.function.IntPredicate filter)
IntIterablefindFirst in interface IntIterablefilter - that should be appliedpublic int count(java.util.function.IntPredicate filter)
IntIterablecount in interface IntIterablefilter - that should be appliedpublic boolean contains(int e)
AbstractIntCollectioncontains in interface IntCollectioncontains in class AbstractIntCollectione - the element that should be searched for.public boolean contains(java.lang.Object e)
AbstractIntCollectionThis 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.Integer>contains in interface java.util.Set<java.lang.Integer>contains in interface IntCollectioncontains in interface IntSetcontains in class AbstractIntCollectionpublic int firstInt()
IntSortedSetfirstInt in interface IntSortedSetpublic int lastInt()
IntSortedSetlastInt in interface IntSortedSetpublic boolean remove(int o)
IntSetpublic boolean remove(java.lang.Object o)
AbstractIntCollectionThis 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.Integer>remove in interface java.util.Set<java.lang.Integer>remove in interface IntCollectionremove in interface IntSetremove in class AbstractIntCollectionpublic int pollFirstInt()
IntSortedSetpollFirstInt in interface IntSortedSetpublic int pollLastInt()
IntSortedSetpollLastInt in interface IntSortedSetpublic int size()
size in interface java.util.Collection<java.lang.Integer>size in interface java.util.Set<java.lang.Integer>size in interface ISizeProvidersize in class java.util.AbstractCollection<java.lang.Integer>public void clear()
clear in interface java.util.Collection<java.lang.Integer>clear in interface java.util.Set<java.lang.Integer>clear in class java.util.AbstractCollection<java.lang.Integer>public IntRBTreeSet copy()
IntCollectioncopy in interface IntCollectioncopy in interface IntNavigableSetcopy in interface IntSetcopy in interface IntSortedSetcopy in class AbstractIntSetpublic IntComparator comparator()
IntSortedSetcomparator in interface java.util.SortedSet<java.lang.Integer>comparator in interface IntSortedSetpublic IntBidirectionalIterator iterator()
IntCollectioniterator in interface java.lang.Iterable<java.lang.Integer>iterator in interface java.util.Collection<java.lang.Integer>iterator in interface java.util.NavigableSet<java.lang.Integer>iterator in interface java.util.Set<java.lang.Integer>iterator in interface IntCollectioniterator in interface IntIterableiterator in interface IntNavigableSetiterator in interface IntSetiterator in interface IntSortedSetiterator in class AbstractIntSetCollection.iterator()public IntBidirectionalIterator iterator(int fromElement)
IntSortedSetiterator in interface IntSortedSetfromElement - the element the iterator should start frompublic IntBidirectionalIterator descendingIterator()
descendingIterator in interface java.util.NavigableSet<java.lang.Integer>descendingIterator in interface IntNavigableSetpublic IntNavigableSet subSet(int fromElement, boolean fromInclusive, int toElement, boolean toInclusive)
IntNavigableSetsubSet in interface IntNavigableSetfromElement - where the SubSet should startfromInclusive - if the fromElement is inclusive or nottoElement - where the SubSet should endtoInclusive - if the toElement is inclusive or notpublic IntNavigableSet headSet(int toElement, boolean inclusive)
IntNavigableSetheadSet in interface IntNavigableSettoElement - where the HeadSet should endinclusive - if the toElement is inclusive or notpublic IntNavigableSet tailSet(int fromElement, boolean inclusive)
IntNavigableSettailSet in interface IntNavigableSetfromElement - where the TailSet should startinclusive - if the fromElement is inclusive or notpublic IntNavigableSet descendingSet()
descendingSet in interface java.util.NavigableSet<java.lang.Integer>descendingSet in interface IntNavigableSet