|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides interface for queue.
This class provides interface for a universal queue.
Method Summary | |
boolean |
add(java.lang.Object object)
Adds the object to the queue. |
void |
clear()
Removes all objects from the queue. |
java.lang.Object |
get()
Returns an object from the queue. |
java.lang.Object |
peek()
Returns an object from the queue. |
int |
size()
Returns the queue size. |
Method Detail |
public boolean add(java.lang.Object object)
The method returns false if the given object could not be added to the queue. A common reason may be that the queue have a fixed capacity and the current number of the queued objects has reached the size limit.
object
- the object to be added to the queue
public java.lang.Object get()
The returned object is removed from the queue.
public java.lang.Object peek()
The returned object remains in the queue.
public void clear()
public int size()
Returns the current number of the objects in the queue.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |