| java.util.HashSet org.antlr.misc.OrderedHashSet
OrderedHashSet | public class OrderedHashSet extends HashSet (Code) | | A HashMap that remembers the order that the elements were added.
You can alter the ith element with set(i,value) too :) Unique list.
I need the replace/set-element-i functionality so I'm subclassing
OrderedHashSet.
|
Method Summary | |
public boolean | add(Object value) Add a value to list; keep in hashtable for consistency also;
Key is object itself. | public void | clear() | public List | elements() Return the List holding list of table elements. | public Object | get(int i) | public boolean | remove(Object o) | public Object | set(int i, Object 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. | public int | size() | public String | toString() |
elements | protected List elements(Code) | | Track the elements as they are added to the set
|
add | public boolean add(Object value)(Code) | | Add a value to list; keep in hashtable for consistency also;
Key is object itself. Good for say asking if a certain string is in
a list of strings.
|
clear | public void clear()(Code) | | |
elements | public List elements()(Code) | | Return the List holding list of table elements. Note that you are
NOT getting a copy so don't write to the list.
|
set | public Object set(int i, Object value)(Code) | | 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.
|
|
|