public class IntAVLTreeSet extends AbstractIntSet implements IntNavigableSet
| Constructor and Description |
|---|
IntAVLTreeSet()
Default Constructor
|
IntAVLTreeSet(java.util.Collection<? extends java.lang.Integer> collection)
Deprecated.
|
IntAVLTreeSet(java.util.Collection<? extends java.lang.Integer> collection,
IntComparator comp)
Deprecated.
|
IntAVLTreeSet(int[] array)
Helper constructor that allow to create a set from an array
|
IntAVLTreeSet(int[] array,
IntComparator comp)
Helper constructor that allow to create a set from an array
|
IntAVLTreeSet(int[] array,
int offset,
int length)
Helper constructor that allow to create a set from an array
|
IntAVLTreeSet(int[] array,
int offset,
int length,
IntComparator comp)
Helper constructor that allow to create a set from an array
|
IntAVLTreeSet(IntCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
IntAVLTreeSet(IntCollection collection,
IntComparator comp)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
IntAVLTreeSet(IntComparator comp)
Constructor that allows to define the sorter
|
IntAVLTreeSet(IntIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntAVLTreeSet(IntIterator iterator,
IntComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntAVLTreeSet(IntSortedSet sortedSet)
A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.
|
IntAVLTreeSet(java.util.Iterator<java.lang.Integer> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntAVLTreeSet(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
|
boolean |
addAndMoveToFirst(int o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(int o)
A customized add method that allows you to insert into the last index.
|
int |
ceiling(int e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
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.
|
IntBidirectionalIterator |
descendingIterator() |
IntNavigableSet |
descendingSet() |
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.
|
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.
|
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.
|
boolean |
moveToFirst(int o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(int o)
A specific move method to move a given key to the last index.
|
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
|
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, containsAny, containsAny, remInt, removeAll, retainAll, toIntArray, toIntArraycontainsAll, 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, toIntArray, toIntArrayforEach, forEachpublic IntAVLTreeSet()
public IntAVLTreeSet(IntComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic IntAVLTreeSet(int[] array)
array - the elements that should be usedpublic IntAVLTreeSet(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 IntAVLTreeSet(int[] array,
IntComparator comp)
array - the elements that should be usedcomp - the sorter of the tree, can be nullpublic IntAVLTreeSet(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 IntAVLTreeSet(IntSortedSet sortedSet)
sortedSet - the set the elements should be added to the TreeSet@Deprecated public IntAVLTreeSet(java.util.Collection<? extends java.lang.Integer> collection)
collection - the set the elements should be added to the TreeSet@Deprecated
public IntAVLTreeSet(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 IntAVLTreeSet(IntCollection collection)
collection - the set the elements should be added to the TreeSetpublic IntAVLTreeSet(IntCollection collection, IntComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic IntAVLTreeSet(java.util.Iterator<java.lang.Integer> iterator)
iterator - the elements that should be added to the setpublic IntAVLTreeSet(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 IntAVLTreeSet(IntIterator iterator)
iterator - the elements that should be added to the setpublic IntAVLTreeSet(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 boolean addAndMoveToFirst(int o)
IntSortedSetaddAndMoveToFirst in interface IntSortedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(int o)
IntSortedSetaddAndMoveToLast in interface IntSortedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(int o)
IntSortedSetmoveToFirst in interface IntSortedSeto - that should be moved to the first indexpublic boolean moveToLast(int o)
IntSortedSetmoveToLast in interface IntSortedSeto - that should be moved to the first lastpublic 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 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 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 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