|
|||||||||||
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(Object obj)
Enqueue an object onto the queue. |
Object |
getBack()
Get the object at the back of the queue. |
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. |
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 IllegalArgumentException
size
- New maximim pool size or UNLIMITED_MAXIMUM_SIZE
.
IllegalArgumentException
- Illegal size.public boolean isFull()
public boolean isEmpty()
isEmpty
in interface Collection
public boolean add(Object obj) throws FullCollectionException
add
in interface Collection
obj
- Object to enqueue.
FullCollectionException
- The queue is full.public Object remove() throws EmptyCollectionException
EmptyCollectionException
- The queue is empty.public Object getFront() throws EmptyCollectionException
EmptyCollectionException
- The queue is empty.public Object getBack() throws EmptyCollectionException
EmptyCollectionException
- The queue is empty.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |