T - the type of elements maintained by this Collectionpublic class ObjectLinkedOpenCustomHashSet<T> extends ObjectOpenCustomHashSet<T> implements ObjectSortedSet<T>
| Constructor and Description |
|---|
ObjectLinkedOpenCustomHashSet(java.util.Collection<? extends T> collection,
float loadFactor,
ObjectStrategy<? super T> strategy)
Deprecated.
|
ObjectLinkedOpenCustomHashSet(java.util.Collection<? extends T> collection,
ObjectStrategy<? super T> strategy)
Deprecated.
|
ObjectLinkedOpenCustomHashSet(int minCapacity,
float loadFactor,
ObjectStrategy<? super T> strategy)
Constructor that defines the minimum capacity and load factor
|
ObjectLinkedOpenCustomHashSet(int minCapacity,
ObjectStrategy<? super T> strategy)
Constructor that defines the minimum capacity
|
ObjectLinkedOpenCustomHashSet(java.util.Iterator<T> iterator,
float loadFactor,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectLinkedOpenCustomHashSet(java.util.Iterator<T> iterator,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectLinkedOpenCustomHashSet(ObjectCollection<T> collection,
float loadFactor,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectLinkedOpenCustomHashSet(ObjectCollection<T> collection,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectLinkedOpenCustomHashSet(ObjectStrategy<? super T> strategy)
Default Contstructor
|
ObjectLinkedOpenCustomHashSet(T[] array,
float loadFactor,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a set from unboxed values
|
ObjectLinkedOpenCustomHashSet(T[] array,
int offset,
int length,
float loadFactor,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a set from unboxed values
|
ObjectLinkedOpenCustomHashSet(T[] array,
int offset,
int length,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a set from unboxed values
|
ObjectLinkedOpenCustomHashSet(T[] array,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a set from unboxed values
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAndMoveToFirst(T o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(T o)
A customized add method that allows you to insert into the last index.
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
java.util.Comparator<T> |
comparator()
A Type Specific Comparator method
|
T |
first() |
ObjectSortedSet<T> |
headSet(T toElement) |
ObjectListIterator<T> |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
ObjectBidirectionalIterator<T> |
iterator(T fromElement)
A type Specific Iterator starting from a given key
|
T |
last() |
boolean |
moveToFirst(T o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(T o)
A specific move method to move a given key to the last index.
|
T |
pollFirst()
A method to get and remove the first element in the set
|
T |
pollLast()
A method to get and remove the last element in the set
|
ObjectSortedSet<T> |
subSet(T fromElement,
T toElement) |
ObjectSortedSet<T> |
tailSet(T fromElement) |
add, addAll, addAll, contains, getStrategy, remove, size, trimequals, hashCodecontainsAll, containsAny, containsAny, removeAll, retainAllcontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringspliteratoraddAll, containsAll, containsAny, containsAny, removeAll, retainAlladd, addAll, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayclearAndTrim, trimpublic ObjectLinkedOpenCustomHashSet(ObjectStrategy<? super T> strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ObjectLinkedOpenCustomHashSet(int minCapacity,
ObjectStrategy<? super T> strategy)
minCapacity - the minimum capacity the HashSet is allowed to be.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativepublic ObjectLinkedOpenCustomHashSet(int minCapacity,
float loadFactor,
ObjectStrategy<? super T> strategy)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectLinkedOpenCustomHashSet(T[] array, ObjectStrategy<? super T> strategy)
array - the elements that should be put into the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ObjectLinkedOpenCustomHashSet(T[] array, float loadFactor, ObjectStrategy<? super T> strategy)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectLinkedOpenCustomHashSet(T[] array, int offset, int length, ObjectStrategy<? super T> strategy)
array - the elements that should be put into the setoffset - the starting index within the array that should be usedlength - the amount of elements used from the arraystrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ObjectLinkedOpenCustomHashSet(T[] array, int offset, int length, float loadFactor, ObjectStrategy<? super T> strategy)
array - the elements that should be put into the setoffset - the starting index within the array that should be usedlength - the amount of elements used from the arrayloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if offset and length causes to step outside of the arrays range@Deprecated public ObjectLinkedOpenCustomHashSet(java.util.Collection<? extends T> collection, ObjectStrategy<? super T> strategy)
collection - the set the elements should be added to the Setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is null@Deprecated public ObjectLinkedOpenCustomHashSet(java.util.Collection<? extends T> collection, float loadFactor, ObjectStrategy<? super T> strategy)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectLinkedOpenCustomHashSet(ObjectCollection<T> collection, ObjectStrategy<? super T> strategy)
collection - the set the elements should be added to the Setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ObjectLinkedOpenCustomHashSet(ObjectCollection<T> collection, float loadFactor, ObjectStrategy<? super T> strategy)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectLinkedOpenCustomHashSet(java.util.Iterator<T> iterator, ObjectStrategy<? super T> strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ObjectLinkedOpenCustomHashSet(java.util.Iterator<T> iterator, float loadFactor, ObjectStrategy<? super T> strategy)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public boolean addAndMoveToFirst(T o)
ObjectSortedSetaddAndMoveToFirst in interface ObjectSortedSet<T>o - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(T o)
ObjectSortedSetaddAndMoveToLast in interface ObjectSortedSet<T>o - the element that should be insertedSet.add(Object)public boolean moveToFirst(T o)
ObjectSortedSetmoveToFirst in interface ObjectSortedSet<T>o - that should be moved to the first indexpublic boolean moveToLast(T o)
ObjectSortedSetmoveToLast in interface ObjectSortedSet<T>o - that should be moved to the first lastpublic T pollFirst()
ObjectSortedSetpollFirst in interface ObjectSortedSet<T>public T pollLast()
ObjectSortedSetpollLast in interface ObjectSortedSet<T>public void clear()
clear in interface java.util.Collection<T>clear in interface java.util.Set<T>clear in class ObjectOpenCustomHashSet<T>public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class ObjectOpenCustomHashSet<T>size - the amount of elements that should be allowedpublic ObjectListIterator<T> iterator()
ObjectCollectioniterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>iterator in interface java.util.Set<T>iterator in interface ObjectCollection<T>iterator in interface ObjectIterable<T>iterator in interface ObjectSet<T>iterator in interface ObjectSortedSet<T>iterator in class ObjectOpenCustomHashSet<T>Collection.iterator()public ObjectBidirectionalIterator<T> iterator(T fromElement)
ObjectSortedSetiterator in interface ObjectSortedSet<T>fromElement - the element the iterator should start frompublic java.util.Comparator<T> comparator()
ObjectSortedSetcomparator in interface java.util.SortedSet<T>comparator in interface ObjectSortedSet<T>public ObjectSortedSet<T> subSet(T fromElement, T toElement)
subSet in interface java.util.SortedSet<T>subSet in interface ObjectSortedSet<T>public ObjectSortedSet<T> headSet(T toElement)
headSet in interface java.util.SortedSet<T>headSet in interface ObjectSortedSet<T>public ObjectSortedSet<T> tailSet(T fromElement)
tailSet in interface java.util.SortedSet<T>tailSet in interface ObjectSortedSet<T>