public class CharRBTreeSet extends AbstractCharSet implements CharNavigableSet
| Constructor and Description |
|---|
CharRBTreeSet()
Default Constructor
|
CharRBTreeSet(char[] array)
Helper constructor that allow to create a set from an array
|
CharRBTreeSet(char[] array,
CharComparator comp)
Helper constructor that allow to create a set from an array
|
CharRBTreeSet(char[] array,
int offset,
int length)
Helper constructor that allow to create a set from an array
|
CharRBTreeSet(char[] array,
int offset,
int length,
CharComparator comp)
Helper constructor that allow to create a set from an array
|
CharRBTreeSet(CharCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
CharRBTreeSet(CharCollection collection,
CharComparator comp)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
CharRBTreeSet(CharComparator comp)
Constructor that allows to define the sorter
|
CharRBTreeSet(CharIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharRBTreeSet(CharIterator iterator,
CharComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharRBTreeSet(CharSortedSet sortedSet)
A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.
|
CharRBTreeSet(java.util.Collection<? extends java.lang.Character> collection)
Deprecated.
|
CharRBTreeSet(java.util.Collection<? extends java.lang.Character> collection,
CharComparator comp)
Deprecated.
|
CharRBTreeSet(java.util.Iterator<java.lang.Character> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharRBTreeSet(java.util.Iterator<java.lang.Character> iterator,
CharComparator 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(char o)
A Type-Specific add function to reduce (un)boxing
|
char |
ceiling(char e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
java.lang.Character |
ceiling(java.lang.Character e) |
void |
clear() |
CharComparator |
comparator()
A Type Specific Comparator method
|
boolean |
contains(char e)
A Type-Specific implementation of contains.
|
boolean |
contains(java.lang.Object e)
This default implementation delegates to the corresponding type-specific function.
|
CharRBTreeSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Char2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
CharBidirectionalIterator |
descendingIterator() |
CharNavigableSet |
descendingSet() |
char |
findFirst(Char2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
char |
firstChar()
A method to get the first element in the set
|
char |
floor(char e)
A Type Specific floor method to reduce boxing/unboxing.
|
java.lang.Character |
floor(java.lang.Character e) |
void |
forEach(CharConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
<E> void |
forEach(E input,
ObjectCharConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
char |
getDefaultMaxValue()
A Helper method to get the max value for SubSets.
|
char |
getDefaultMinValue()
A Helper method to get the min value for SubSets.
|
CharNavigableSet |
headSet(char toElement,
boolean inclusive)
A Type Specific HeadSet method to reduce boxing/unboxing
|
char |
higher(char e)
A Type Specific higher method to reduce boxing/unboxing.
|
java.lang.Character |
higher(java.lang.Character e) |
CharBidirectionalIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
CharBidirectionalIterator |
iterator(char fromElement)
A type Specific Iterator starting from a given key
|
char |
lastChar()
A method to get the last element in the set
|
char |
lower(char e)
A Type Specific lower method to reduce boxing/unboxing.
|
java.lang.Character |
lower(java.lang.Character e) |
boolean |
matchesAll(Char2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Char2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Char2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
char |
pollFirstChar()
A method to get and remove the first element in the set
|
char |
pollLastChar()
A method to get and remove the last element in the set
|
char |
reduce(char identity,
CharCharUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
char |
reduce(CharCharUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remove(char 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(char value)
A Helper method to set the max value for SubSets.
|
void |
setDefaultMinValue(char value)
A Helper method to set the min value for SubSets.
|
int |
size() |
CharNavigableSet |
subSet(char fromElement,
boolean fromInclusive,
char toElement,
boolean toInclusive)
A Type Specific SubSet method to reduce boxing/unboxing
|
CharNavigableSet |
tailSet(char fromElement,
boolean inclusive)
A Type Specific TailSet method to reduce boxing/unboxing
|
equals, hashCodeadd, addAll, addAll, containsAll, containsAll, containsAny, containsAny, remChar, removeAll, removeAll, retainAll, retainAll, toCharArray, toCharArrayisEmpty, 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, toCharArray, toCharArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, sortedpublic CharRBTreeSet()
public CharRBTreeSet(CharComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic CharRBTreeSet(char[] array)
array - the elements that should be usedpublic CharRBTreeSet(char[] 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 CharRBTreeSet(char[] array,
CharComparator comp)
array - the elements that should be usedcomp - the sorter of the tree, can be nullpublic CharRBTreeSet(char[] array,
int offset,
int length,
CharComparator 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 CharRBTreeSet(CharSortedSet sortedSet)
sortedSet - the set the elements should be added to the TreeSet@Deprecated public CharRBTreeSet(java.util.Collection<? extends java.lang.Character> collection)
collection - the set the elements should be added to the TreeSet@Deprecated
public CharRBTreeSet(java.util.Collection<? extends java.lang.Character> collection,
CharComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic CharRBTreeSet(CharCollection collection)
collection - the set the elements should be added to the TreeSetpublic CharRBTreeSet(CharCollection collection, CharComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic CharRBTreeSet(java.util.Iterator<java.lang.Character> iterator)
iterator - the elements that should be added to the setpublic CharRBTreeSet(java.util.Iterator<java.lang.Character> iterator,
CharComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic CharRBTreeSet(CharIterator iterator)
iterator - the elements that should be added to the setpublic CharRBTreeSet(CharIterator iterator, CharComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic void setDefaultMaxValue(char value)
CharNavigableSetsetDefaultMaxValue in interface CharNavigableSetvalue - the new max valuepublic char getDefaultMaxValue()
CharNavigableSetgetDefaultMaxValue in interface CharNavigableSetpublic void setDefaultMinValue(char value)
CharNavigableSetsetDefaultMinValue in interface CharNavigableSetvalue - the new min valuepublic char getDefaultMinValue()
CharNavigableSetgetDefaultMinValue in interface CharNavigableSetpublic boolean add(char o)
CharCollectionadd in interface CharCollectiono - the element that should be addedpublic char lower(char e)
CharNavigableSetlower in interface CharNavigableSete - that should be compared with.public char floor(char e)
CharNavigableSetfloor in interface CharNavigableSete - that should be compared with.public char higher(char e)
CharNavigableSethigher in interface CharNavigableSete - that should be compared with.public char ceiling(char e)
CharNavigableSetceiling in interface CharNavigableSete - that should be compared with.public java.lang.Character lower(java.lang.Character e)
lower in interface java.util.NavigableSet<java.lang.Character>lower in interface CharNavigableSetpublic java.lang.Character floor(java.lang.Character e)
floor in interface java.util.NavigableSet<java.lang.Character>floor in interface CharNavigableSetpublic java.lang.Character higher(java.lang.Character e)
higher in interface java.util.NavigableSet<java.lang.Character>higher in interface CharNavigableSetpublic java.lang.Character ceiling(java.lang.Character e)
ceiling in interface java.util.NavigableSet<java.lang.Character>ceiling in interface CharNavigableSetpublic void forEach(CharConsumer action)
CharIterableforEach in interface CharIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectCharConsumer<E> action)
CharIterableforEach in interface CharIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Char2BooleanFunction filter)
CharIterablematchesAny in interface CharIterablefilter - that should be appliedpublic boolean matchesNone(Char2BooleanFunction filter)
CharIterablematchesNone in interface CharIterablefilter - that should be appliedpublic boolean matchesAll(Char2BooleanFunction filter)
CharIterablematchesAll in interface CharIterablefilter - that should be appliedpublic char reduce(char identity,
CharCharUnaryOperator operator)
CharIterablereduce in interface CharIterableidentity - the start valueoperator - the operation that should be appliedpublic char reduce(CharCharUnaryOperator operator)
CharIterablereduce in interface CharIterableoperator - the operation that should be appliedpublic char findFirst(Char2BooleanFunction filter)
CharIterablefindFirst in interface CharIterablefilter - that should be appliedpublic int count(Char2BooleanFunction filter)
CharIterablecount in interface CharIterablefilter - that should be appliedpublic boolean contains(char e)
AbstractCharCollectioncontains in interface CharCollectioncontains in class AbstractCharCollectione - the element that should be searched for.public boolean contains(java.lang.Object e)
AbstractCharCollectionThis 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.Character>contains in interface java.util.Set<java.lang.Character>contains in interface CharCollectioncontains in interface CharSetcontains in class AbstractCharCollectionpublic char firstChar()
CharSortedSetfirstChar in interface CharSortedSetpublic char lastChar()
CharSortedSetlastChar in interface CharSortedSetpublic boolean remove(char o)
CharSetpublic boolean remove(java.lang.Object o)
AbstractCharCollectionThis 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.Character>remove in interface java.util.Set<java.lang.Character>remove in interface CharCollectionremove in interface CharSetremove in class AbstractCharCollectionpublic char pollFirstChar()
CharSortedSetpollFirstChar in interface CharSortedSetpublic char pollLastChar()
CharSortedSetpollLastChar in interface CharSortedSetpublic int size()
size in interface java.util.Collection<java.lang.Character>size in interface java.util.Set<java.lang.Character>size in class java.util.AbstractCollection<java.lang.Character>public void clear()
clear in interface java.util.Collection<java.lang.Character>clear in interface java.util.Set<java.lang.Character>clear in class java.util.AbstractCollection<java.lang.Character>public CharRBTreeSet copy()
CharCollectioncopy in interface CharCollectioncopy in interface CharNavigableSetcopy in interface CharSetcopy in interface CharSortedSetcopy in class AbstractCharSetpublic CharComparator comparator()
CharSortedSetcomparator in interface java.util.SortedSet<java.lang.Character>comparator in interface CharSortedSetpublic CharBidirectionalIterator iterator()
CharCollectioniterator in interface java.lang.Iterable<java.lang.Character>iterator in interface java.util.Collection<java.lang.Character>iterator in interface java.util.NavigableSet<java.lang.Character>iterator in interface java.util.Set<java.lang.Character>iterator in interface CharCollectioniterator in interface CharIterableiterator in interface CharNavigableSetiterator in interface CharSetiterator in interface CharSortedSetiterator in class AbstractCharSetCollection.iterator()public CharBidirectionalIterator iterator(char fromElement)
CharSortedSetiterator in interface CharSortedSetfromElement - the element the iterator should start frompublic CharBidirectionalIterator descendingIterator()
descendingIterator in interface java.util.NavigableSet<java.lang.Character>descendingIterator in interface CharNavigableSetpublic CharNavigableSet subSet(char fromElement, boolean fromInclusive, char toElement, boolean toInclusive)
CharNavigableSetsubSet in interface CharNavigableSetfromElement - where the SubSet should startfromInclusive - if the fromElement is inclusive or nottoElement - where the SubSet should endtoInclusive - if the toElement is inclusive or notpublic CharNavigableSet headSet(char toElement, boolean inclusive)
CharNavigableSetheadSet in interface CharNavigableSettoElement - where the HeadSet should endinclusive - if the toElement is inclusive or notpublic CharNavigableSet tailSet(char fromElement, boolean inclusive)
CharNavigableSettailSet in interface CharNavigableSetfromElement - where the TailSet should startinclusive - if the fromElement is inclusive or notpublic CharNavigableSet descendingSet()
descendingSet in interface java.util.NavigableSet<java.lang.Character>descendingSet in interface CharNavigableSet