public class HashSetQueue<T>
extends java.util.AbstractCollection<T>
implements java.util.Queue<T>
Queue with fast add/remove/contains.#find(T) which finds the queue element equivalent to its parameter in O(1) avg. timecontains(Object) method is O(1)remove(Object) method is O(1)gnu.trove.THashSet containing double-linked QueueEntry nodes holding elements themselves.| Modifier and Type | Class and Description |
|---|---|
static interface |
HashSetQueue.PositionalIterator<T> |
| Constructor and Description |
|---|
HashSetQueue() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T t) |
boolean |
contains(java.lang.Object o) |
T |
element() |
T |
find(T t) |
HashSetQueue.PositionalIterator<T> |
iterator() |
boolean |
offer(T t) |
T |
peek() |
T |
poll() |
T |
remove() |
boolean |
remove(java.lang.Object o) |
int |
size() |
addAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic boolean add(T t)
public boolean remove(java.lang.Object o)
public int size()
public boolean contains(java.lang.Object o)
public HashSetQueue.PositionalIterator<T> iterator()