|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Queue
A first-in, first-out structure. Values are added at the tail, and removed from the head. Used to process values in the order that they appear.
Stack
Method Summary | |
---|---|
void |
add(java.lang.Object value)
Add a value to the tail of the queue. |
java.lang.Object |
dequeue()
Remove a value from the head of the queue. |
boolean |
empty()
Returns true iff the queue is empty. |
void |
enqueue(java.lang.Object value)
Add a value to the tail of the queue. |
java.lang.Object |
get()
Fetch the value at the head of the queue. |
java.lang.Object |
getFirst()
Fetch the value at the head of the queue. |
java.lang.Object |
peek()
Fetch the value at the head of the queue. |
java.lang.Object |
remove()
Remove a value form the head of the queue. |
int |
size()
Returns the number of elements in the queue. |
Methods inherited from interface structure.Structure |
---|
clear, contains, elements, isEmpty, iterator, remove, values |
Method Detail |
---|
void add(java.lang.Object value)
add
in interface Linear
add
in interface Structure
value
- The value added.enqueue(java.lang.Object)
void enqueue(java.lang.Object value)
value
- The value to be added.java.lang.Object remove()
remove
in interface Linear
dequeue()
java.lang.Object dequeue()
java.lang.Object getFirst()
java.lang.Object get()
get
in interface Linear
java.lang.Object peek()
boolean empty()
empty
in interface Linear
int size()
size
in interface Linear
size
in interface Structure
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |