public class OrderedHashSet<T> extends LinkedHashSet<T>
Modifier and Type | Field and Description |
---|---|
protected 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() |
Object |
clone() |
List<T> |
elements()
Return the List holding list of table elements.
|
boolean |
equals(Object o) |
T |
get(int i) |
int |
hashCode() |
Iterator<T> |
iterator() |
boolean |
remove(int i) |
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.
|
Object[] |
toArray() |
String |
toString() |
removeAll
addAll, containsAll, retainAll, toArray
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(Object o)
public void clear()
public int hashCode()
hashCode
in interface Collection<T>
hashCode
in interface Set<T>
hashCode
in class AbstractSet<T>
public boolean equals(Object o)
equals
in interface Collection<T>
equals
in interface Set<T>
equals
in class AbstractSet<T>
public List<T> elements()
public Object[] toArray()
toArray
in interface Collection<T>
toArray
in interface Set<T>
toArray
in class AbstractCollection<T>
public String toString()
toString
in class AbstractCollection<T>
Copyright © 1992-2013 ANTLR. All Rights Reserved.