com.waveset.util
Class Queue
java.lang.Object
com.waveset.util.Queue
- Direct Known Subclasses:
- SynchronizedQueue
- public class Queue
- extends java.lang.Object
Field Summary |
static java.lang.String |
code_id
|
Constructor Summary |
|
Queue()
|
protected |
Queue(java.util.List queue)
|
Method Summary |
void |
clear()
|
java.lang.Object |
dequeue()
|
void |
enqueue(java.lang.Object obj)
Add the specified item to the back of the queue. |
java.lang.Object |
findEquivalent(java.lang.Object o)
Return the object in the queue matching
the requested one. |
boolean |
isEmpty()
|
java.lang.Object |
peek(int i)
|
void |
poke(int i,
java.lang.Object o)
|
java.util.ListIterator |
preview()
Return a ListIterator which can be used to
view/manipulate the queue. |
boolean |
remove(java.lang.Object o)
|
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
code_id
public static final java.lang.String code_id
- See Also:
- Constant Field Values
Queue
public Queue()
Queue
protected Queue(java.util.List queue)
enqueue
public void enqueue(java.lang.Object obj)
- Add the specified item to the back of the queue.
dequeue
public java.lang.Object dequeue()
- Returns:
- the next item from the front of the queue.
isEmpty
public boolean isEmpty()
- Returns:
true
if the queue is empty;
false
otherwise.
size
public int size()
- Returns:
- the number of items in the queue.
peek
public java.lang.Object peek(int i)
poke
public void poke(int i,
java.lang.Object o)
preview
public java.util.ListIterator preview()
- Return a ListIterator which can be used to
view/manipulate the queue.
Use with care!
findEquivalent
public java.lang.Object findEquivalent(java.lang.Object o)
- Return the object in the queue matching
the requested one.
Primarily used for matching by equivalence class.
remove
public boolean remove(java.lang.Object o)
clear
public void clear()