public class OrderedHashSet<T>
extends java.util.LinkedHashSet<T>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<T> |
elements
Track the elements as they are added to the set
|
| Constructor and Description |
|---|
OrderedHashSet() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T value)
Add a value to list; keep in hashtable for consistency also;
Key is object itself.
|
void |
clear() |
java.util.List<T> |
elements()
Return the List holding list of table elements.
|
T |
get(int i) |
java.util.Iterator<T> |
iterator() |
boolean |
remove(java.lang.Object o) |
T |
set(int i,
T value)
Replace an existing value with a new value; updates the element
list and the hash table, but not the key as that has not changed.
|
int |
size() |
java.lang.Object[] |
toArray() |
java.lang.String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, waitprotected java.util.List<T> elements
public T get(int i)
public T set(int i, T value)
public boolean add(T value)
public boolean remove(java.lang.Object o)
public void clear()
public java.util.List<T> elements()
public java.util.Iterator<T> iterator()
public java.lang.Object[] toArray()
public int size()
public java.lang.String toString()
toString in class java.util.AbstractCollection<T>