T - the type of elements maintained by this Collectionpublic class ObjectLinkedOpenHashSet<T> extends ObjectOpenHashSet<T> implements ObjectSortedSet<T>
| Constructor and Description |
|---|
ObjectLinkedOpenHashSet()
Default Constructor
|
ObjectLinkedOpenHashSet(java.util.Collection<? extends T> collection)
Deprecated.
|
ObjectLinkedOpenHashSet(java.util.Collection<? extends T> collection,
float loadFactor)
Deprecated.
|
ObjectLinkedOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
ObjectLinkedOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
ObjectLinkedOpenHashSet(java.util.Iterator<T> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectLinkedOpenHashSet(java.util.Iterator<T> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectLinkedOpenHashSet(ObjectCollection<T> collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectLinkedOpenHashSet(ObjectCollection<T> collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectLinkedOpenHashSet(T[] array)
Helper constructor that allow to create a set from unboxed values
|
ObjectLinkedOpenHashSet(T[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ObjectLinkedOpenHashSet(T[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
ObjectLinkedOpenHashSet(T[] array,
int offset,
int length,
float loadFactor)
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, 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 ObjectLinkedOpenHashSet()
public ObjectLinkedOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic ObjectLinkedOpenHashSet(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectLinkedOpenHashSet(T[] array)
array - the elements that should be put into the setpublic ObjectLinkedOpenHashSet(T[] array, float loadFactor)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectLinkedOpenHashSet(T[] array, int offset, int length)
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 arrayjava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ObjectLinkedOpenHashSet(T[] array, int offset, int length, float loadFactor)
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 resizejava.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 ObjectLinkedOpenHashSet(java.util.Collection<? extends T> collection)
collection - the set the elements should be added to the Set@Deprecated public ObjectLinkedOpenHashSet(java.util.Collection<? extends T> collection, float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectLinkedOpenHashSet(ObjectCollection<T> collection)
collection - the set the elements should be added to the Setpublic ObjectLinkedOpenHashSet(ObjectCollection<T> collection, float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectLinkedOpenHashSet(java.util.Iterator<T> iterator)
iterator - the elements that should be added to the setpublic ObjectLinkedOpenHashSet(java.util.Iterator<T> iterator, float loadFactor)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizejava.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 ObjectOpenHashSet<T>public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class ObjectOpenHashSet<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 ObjectOpenHashSet<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>