|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines a Queue with two ends. Elements are either catagorized at the beginning or at the end of the Queue.
Method Summary | |
void |
addFirst(Object o)
Adds an Object to the beginning of the Queue. |
void |
addLast(Object o)
Adds an Object to the end of the Queue. |
void |
appendFlat(LinearQueue q)
Moves the contents of q to the end of this Queue. |
void |
appendUnrolled(LinearQueue q)
Moves the contents of q to the end of this Queue. |
Object |
peekFirst()
Retrieves the first Object in the Queue. |
Object |
peekLast()
Retrieves the last Object in the Queue. |
void |
prependFlat(LinearQueue q)
Moves the contents of q to the beginning of this Queue. |
void |
prependUnrolled(LinearQueue q)
Moves the contents of q to the beginning of this Queue. |
Object |
removeFirst()
Removes the first Object in the Queue. |
Object |
removeLast()
Removes the last Object in the Queue. |
Methods inherited from interface net.sf.zig_project.gpl.common.queue.Queue |
clear, contains, elements, isEmpty, remove |
Method Detail |
public void addFirst(Object o)
o
- the Object to add
NullPointerException
- if o==null
and this Queue does not support null Objects.public void addLast(Object o)
o
- the Object to add
NullPointerException
- if o==null
and this Queue does not support null Objects.public Object peekFirst()
public Object peekLast()
public Object removeFirst()
public Object removeLast()
public void prependUnrolled(LinearQueue q)
With two Queues of contents q1="a, b, c" and q2="x, y, z", then
q1.prependUnrolled(q2);
would result in q1=="z, y, x, a, b, c", and q2==""
IllegalArgumentException
- if q==this
public void prependFlat(LinearQueue q)
With two Queues of contents q1="a, b, c" and q2="x, y, z", then
q1.prependFlat(q2);
would result in q1=="x, y, z, a, b, c", and q2==""
IllegalArgumentException
- if q==this
public void appendFlat(LinearQueue q)
With two Queues of contents q1="a, b, c" and q2="x, y, z", then
q1.appendFlat(q2);
would result in q1=="a, b, c, x, y, z", and q2==""
IllegalArgumentException
- if q==this
public void appendUnrolled(LinearQueue q)
With two Queues of contents q1="a, b, c" and q2="x, y, z", then
q1.appendUnrolled(q2);
would result in q1=="a, b, c, z, y, x", and q2==""
IllegalArgumentException
- if q==this
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |