|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An enhanced queue which permits which permits additional operations, such as pushing an element on the front.
Method Summary | |
boolean |
addToFront(java.lang.Object newValue)
Add (push) an element to the front of the queue; thus, the next dequeue operation would return this value, assuming there were no other intervening addToFront operations. |
java.lang.Object |
getObject(int index)
Get an object from the queue. |
Methods inherited from interface stockportfolio.IQueue |
dequeue, enqueue, front, isEmpty, isFull, size |
Method Detail |
public boolean addToFront(java.lang.Object newValue)
newValue
- a non-null object
java.lang.IllegalArgumentException
- if the new value is null.public java.lang.Object getObject(int index)
index
- an index number, with 0 being the oldest object
(i.e., the one at the front of the queue), 1 being
next oldest, etc.
java.lang.IllegalArgumentException
- if index is not a valid index.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |