|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An iterface used to implement a first-in, first-out container.
| Field Summary | |
static int |
UNLIMITED_MAXIMUM_SIZE
Unlimited maximum queue size identifier. |
| Method Summary | |
boolean |
add(java.lang.Object obj)
Enqueue an object onto the queue. |
java.lang.Object |
getBack()
Get the object at the back of the queue. |
java.lang.Object |
getFront()
Get the object at the front of the queue. |
int |
getMaximumSize()
Get the maximum size of the queue. |
boolean |
isEmpty()
Check if the queue is empty. |
boolean |
isFull()
Check if the queue is full. |
java.lang.Object |
remove()
Dequeue an object from the queue. |
void |
setMaximumSize(int size)
Set the maximum size of the queue. |
| Methods inherited from interface java.util.Collection |
addAll, clear, contains, containsAll, equals, hashCode, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Field Detail |
public static final int UNLIMITED_MAXIMUM_SIZE
| Method Detail |
public int getMaximumSize()
UNLIMITED_MAXIMUM_SIZE.
public void setMaximumSize(int size)
throws java.lang.IllegalArgumentException
size - New maximim pool size or UNLIMITED_MAXIMUM_SIZE.
java.lang.IllegalArgumentException - Illegal size.public boolean isFull()
public boolean isEmpty()
isEmpty in interface java.util.Collection
public boolean add(java.lang.Object obj)
throws FullCollectionException (src)
add in interface java.util.Collectionobj - Object to enqueue.
FullCollectionException (src) - The queue is full.
public java.lang.Object remove()
throws EmptyCollectionException (src)
EmptyCollectionException (src) - The queue is empty.
public java.lang.Object getFront()
throws EmptyCollectionException (src)
EmptyCollectionException (src) - The queue is empty.
public java.lang.Object getBack()
throws EmptyCollectionException (src)
EmptyCollectionException (src) - The queue is empty.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||