|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--JavaQueue
IQueue implementation using a Java Vector to hold its elements.
Field Summary | |
protected Vector |
elements
Vector used to hold elements. |
Constructor Summary | |
JavaQueue()
Creates a new Java queue. |
Method Summary | |
Object |
dequeue()
Removes and returns the front object on this. |
void |
enqueue(Object anObject)
Enqueues the given object onto this. |
Object |
front()
Returns the front object on this. |
boolean |
isEmpty()
Returns whether or not this is empty. |
int |
size()
Returns the number of objects on this. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Vector elements
Constructor Detail |
public JavaQueue()
Method Detail |
public void enqueue(Object anObject)
enqueue
in interface IQueue
anObject
- object to enqueuepublic Object dequeue()
dequeue
in interface IQueue
public Object front()
front
in interface IQueue
public int size()
size
in interface IQueue
public boolean isEmpty()
isEmpty
in interface IQueue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |