public class OrderedHashSet<T> extends LinkedHashSet<T>
| Modifier and Type | Field and Description |
|---|---|
protected 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() |
List<T> |
elements()
Return the List holding list of table elements.
|
T |
get(int i) |
Iterator<T> |
iterator() |
boolean |
remove(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() |
Object[] |
toArray() |
String |
toString() |
equals, hashCode, removeAlladdAll, containsAll, retainAll, toArraypublic T get(int i)
public T set(int i, T value)
public boolean add(T value)
public boolean remove(Object o)
public void clear()
public List<T> elements()
public Object[] toArray()
toArray in interface Collection<T>toArray in interface Set<T>toArray in class AbstractCollection<T>public int size()
public String toString()
toString in class AbstractCollection<T>Copyright © 1992–2014 ANTLR. All rights reserved.