java.lang.Iterable<T>, java.util.Collection<T>public class LightWeightLinkedSet<T> extends LightWeightHashSet<T>
DEFAULT_MAX_LOAD_FACTOR, DEFAUT_MIN_LOAD_FACTOR, entries, MINIMUM_CAPACITY, modification, size| Constructor | Description |
|---|---|
LightWeightLinkedSet() |
|
LightWeightLinkedSet(int initCapacity,
float maxLoadFactor,
float minLoadFactor) |
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
addElem(T element) |
Add given element to the hash table
|
void |
clear() |
Clear the set.
|
java.util.Iterator<T> |
getBookmark() |
Returns a new iterator starting at the bookmarked element.
|
java.util.Iterator<T> |
iterator() |
|
java.util.List<T> |
pollAll() |
Remove all elements from the set and return them in order.
|
T |
pollFirst() |
Remove and return first element on the linked list of all elements.
|
java.util.List<T> |
pollN(int n) |
Remove and return n elements from the hashtable.
|
protected org.apache.hadoop.hdfs.util.LightWeightLinkedSet.DoubleLinkedElement<T> |
removeElem(T key) |
Remove the element corresponding to the key, given key.hashCode() == index.
|
void |
resetBookmark() |
Resets the bookmark to the beginning of the list.
|
<U> U[] |
toArray(U[] a) |
add, addAll, contains, containsAll, expandIfNecessary, getCapacity, getContainedElem, getElement, getIndex, isEmpty, pollToArray, printDetails, remove, removeAll, retainAll, shrinkIfNecessary, size, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic LightWeightLinkedSet(int initCapacity,
float maxLoadFactor,
float minLoadFactor)
initCapacity - Recommended size of the internal array.maxLoadFactor - used to determine when to expand the internal arrayminLoadFactor - used to determine when to shrink the internal arraypublic LightWeightLinkedSet()
protected boolean addElem(T element)
addElem in class LightWeightHashSet<T>protected org.apache.hadoop.hdfs.util.LightWeightLinkedSet.DoubleLinkedElement<T> removeElem(T key)
removeElem in class LightWeightHashSet<T>public T pollFirst()
public java.util.List<T> pollN(int n)
pollN in class LightWeightHashSet<T>public java.util.List<T> pollAll()
pollAll in class LightWeightHashSet<T>public <U> U[] toArray(U[] a)
toArray in interface java.util.Collection<T>toArray in class LightWeightHashSet<T>public java.util.Iterator<T> iterator()
iterator in interface java.util.Collection<T>iterator in interface java.lang.Iterable<T>iterator in class LightWeightHashSet<T>public void clear()
clear in interface java.util.Collection<T>clear in class LightWeightHashSet<T>public java.util.Iterator<T> getBookmark()
public void resetBookmark()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.