public class CharAVLTreeSet extends AbstractCharSet implements CharNavigableSet
| Constructor and Description |
|---|
CharAVLTreeSet()
Default Constructor
|
CharAVLTreeSet(char[] array)
Helper constructor that allow to create a set from an array
|
CharAVLTreeSet(char[] array,
CharComparator comp)
Helper constructor that allow to create a set from an array
|
CharAVLTreeSet(char[] array,
int offset,
int length)
Helper constructor that allow to create a set from an array
|
CharAVLTreeSet(char[] array,
int offset,
int length,
CharComparator comp)
Helper constructor that allow to create a set from an array
|
CharAVLTreeSet(CharCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
CharAVLTreeSet(CharCollection collection,
CharComparator comp)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
CharAVLTreeSet(CharComparator comp)
Constructor that allows to define the sorter
|
CharAVLTreeSet(CharIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharAVLTreeSet(CharIterator iterator,
CharComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharAVLTreeSet(CharSortedSet sortedSet)
A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.
|
CharAVLTreeSet(java.util.Collection<? extends java.lang.Character> collection)
Deprecated.
|
CharAVLTreeSet(java.util.Collection<? extends java.lang.Character> collection,
CharComparator comp)
Deprecated.
|
CharAVLTreeSet(java.util.Iterator<java.lang.Character> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharAVLTreeSet(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
|
boolean |
addAndMoveToFirst(char o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(char o)
A customized add method that allows you to insert into the last index.
|
char |
ceiling(char e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
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.
|
CharBidirectionalIterator |
descendingIterator() |
CharNavigableSet |
descendingSet() |
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.
|
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.
|
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.
|
boolean |
moveToFirst(char o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(char o)
A specific move method to move a given key to the last index.
|
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
|
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, containsAny, containsAny, remChar, removeAll, retainAll, toCharArray, toCharArraycontainsAll, 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, toCharArray, toCharArrayforEach, forEachpublic CharAVLTreeSet()
public CharAVLTreeSet(CharComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic CharAVLTreeSet(char[] array)
array - the elements that should be usedpublic CharAVLTreeSet(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 CharAVLTreeSet(char[] array,
CharComparator comp)
array - the elements that should be usedcomp - the sorter of the tree, can be nullpublic CharAVLTreeSet(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 CharAVLTreeSet(CharSortedSet sortedSet)
sortedSet - the set the elements should be added to the TreeSet@Deprecated public CharAVLTreeSet(java.util.Collection<? extends java.lang.Character> collection)
collection - the set the elements should be added to the TreeSet@Deprecated
public CharAVLTreeSet(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 CharAVLTreeSet(CharCollection collection)
collection - the set the elements should be added to the TreeSetpublic CharAVLTreeSet(CharCollection collection, CharComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic CharAVLTreeSet(java.util.Iterator<java.lang.Character> iterator)
iterator - the elements that should be added to the setpublic CharAVLTreeSet(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 CharAVLTreeSet(CharIterator iterator)
iterator - the elements that should be added to the setpublic CharAVLTreeSet(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 boolean addAndMoveToFirst(char o)
CharSortedSetaddAndMoveToFirst in interface CharSortedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(char o)
CharSortedSetaddAndMoveToLast in interface CharSortedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(char o)
CharSortedSetmoveToFirst in interface CharSortedSeto - that should be moved to the first indexpublic boolean moveToLast(char o)
CharSortedSetmoveToLast in interface CharSortedSeto - that should be moved to the first lastpublic 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 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 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