|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Vector<E>
java.util.Queue<E>
public class Queue<E>
A FIFO Queue of objects.
| Field Summary |
|---|
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Constructor Summary | |
|---|---|
Queue()
creates a new Queue instance |
|
| Method Summary | |
|---|---|
boolean |
empty()
is this Queue empty? |
Object |
peek()
fetches an object from the start of the Queue does not remove it! |
Object |
pop()
fetches an object from the start of the Queue and removes it |
E |
push(E anObject)
pushes an object onto the Queue |
| Methods inherited from class java.util.Vector |
|---|
addElement, capacity, clear, elementAt, elements, ensureCapacity, equals, indexOf, indexOf, insertElementAt, isEmpty, lastIndexOf, lastIndexOf, removeAllElements, removeElement, removeElementAt, setElementAt, setSize, size, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Queue()
| Method Detail |
|---|
public E push(E anObject)
anObject - the object
public Object pop()
throws EmptyQueueException
EmptyQueueException
public Object peek()
throws EmptyQueueException
EmptyQueueExceptionpublic boolean empty()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||