Serializable, Cloneable, Iterable<T>, Collection<T>, Set<T>public class OrderedHashSet<T> extends LinkedHashSet<T>
| Modifier and Type | Field | Description |
|---|---|---|
protected List<T> |
elements |
Track the elements as they are added to the set
|
| Constructor | Description |
|---|---|
OrderedHashSet() |
| Modifier and Type | Method | 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() |
addAll, containsAll, retainAll, toArrayequals, hashCode, removeAllparallelStream, removeIf, streamspliteratorpublic 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–2018 ANTLR. All rights reserved.