|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--intradoc.lang.Queue
The Queue class represents a first-in-first-out (FIFO) queue of objects. We model the interface for java.util.Stack although one has to wonder why it has some obvious duplications from Vector.
intradoc.lang.QueueEmptyException,
Serialized Form| Field Summary |
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
Queue()
|
|
| Method Summary | |
boolean |
empty()
Test if this queue is empty. |
java.lang.Object |
insert(java.lang.Object obj)
Adds an object to the back of this queue. |
java.lang.Object |
peek()
Peeks at the front of this queue and returns that object. |
java.lang.Object |
remove()
Removes an object from the front of this queue and returns that object. |
int |
search(java.lang.Object obj)
Returns where an object is in this queue (first occurrence). |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Constructor Detail |
public Queue()
| Method Detail |
public java.lang.Object insert(java.lang.Object obj)
obj - the object to add to this queue.
obj argument.public java.lang.Object remove()
EmptyQueueException - if this queue is empty.public java.lang.Object peek()
EmptyQueueException - if this queue is empty.public boolean empty()
true if this queue is empty;
false otherwise.public int search(java.lang.Object obj)
obj - the desired object.
-1 if not in the queue.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
(c) 1996-2005 All rights reserved. Stellent, Inc. |