|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for a Queue.
This software is distributed under the Berkeley Software License.
Revisions: - GUIRLib-v1.0-1.0.0, Nov 21 1997, JH Created class - GUIRLib-v1.2-1.0.0, Jun 22 2000, JH Touched for GUIRLib release - GUIRLib-v1.3-1.0.0, Aug 11 2000, JH Touched for GUIRLib release - GUIRLib-v1.4-1.0.0, Aug 31 2000, JH Touched for GUIRLib release
Method Summary | |
int |
capacity()
Get the current maximum capacity of the queue. |
void |
clear()
Clears out all elements in the Queue. |
Object |
dequeue()
Remove and return the first element in the queue. |
void |
enqueue(Object obj)
Add an element to the end of the queue. |
boolean |
isEmpty()
Checks if the queue is empty. |
boolean |
isFull()
Check if the queue is full. |
Object |
peek()
Return the first element in the queue without removing it. |
int |
size()
Gets the size of the queue (the current number of elements in the queue). |
Method Detail |
public Object peek()
public boolean isEmpty()
public boolean isFull()
public int size()
public int capacity()
public void clear()
public void enqueue(Object obj) throws FullException
o
- is the Object to add to the queue.QueueFullException
- if the queue is fullpublic Object dequeue() throws EmptyException
QueueEmptyException
- if the Queue is empty
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |