public class OrderedHashSet<T>
extends java.util.LinkedHashSet<T>
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<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.lang.Object |
clone() |
java.util.List<T> |
elements()
Return the List holding list of table elements.
|
boolean |
equals(java.lang.Object o) |
T |
get(int i) |
int |
hashCode() |
java.util.Iterator<T> |
iterator() |
boolean |
remove(int i) |
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.
|
java.lang.Object[] |
toArray() |
java.lang.String |
toString() |
protected java.util.ArrayList<T> elements
public T get(int i)
public T set(int i, T value)
public boolean remove(int i)
public boolean add(T value)
public boolean remove(java.lang.Object o)
public void clear()
public int hashCode()
public boolean equals(java.lang.Object o)
public java.util.Iterator<T> iterator()
public java.util.List<T> elements()
public java.lang.Object clone()
clone
in class java.util.HashSet<T>
public java.lang.Object[] toArray()
public java.lang.String toString()
toString
in class java.util.AbstractCollection<T>