|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.zig_project.gpl.common.queue.LinearQueueBase
Abstract base class for LinearQueues. This class defines a few simple default operations required by LinearQueues.
Constructor Summary | |
LinearQueueBase()
|
Method Summary | |
void |
add(Object o)
Adds a single Object to the Queue. |
void |
addSet(Enumeration e)
Adds an entire Enumeration of elements to the Queue. |
void |
appendFlat(LinearQueue q)
Moves the contents of q to the end of this Queue. |
void |
appendFlat(OrderedQueue q)
|
void |
appendUnrolled(LinearQueue q)
Moves the contents of q to the end of this Queue. |
void |
appendUnrolled(OrderedQueue q)
|
protected void |
bulkMoveTest(LinearQueue q)
|
void |
prependFlat(LinearQueue q)
Moves the contents of q to the beginning of this Queue. |
void |
prependFlat(OrderedQueue q)
|
void |
prependUnrolled(LinearQueue q)
Moves the contents of q to the beginning of this Queue. |
void |
prependUnrolled(OrderedQueue q)
|
String |
toString()
General purpose String representation. |
boolean |
transferTo(Object o,
GenericBlockingQueue q)
Transfers an Object out of this Queue and into another. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.zig_project.gpl.common.queue.LinearQueue |
addFirst, addLast, peekFirst, peekLast, removeFirst, removeLast |
Methods inherited from interface net.sf.zig_project.gpl.common.queue.Queue |
clear, contains, elements, isEmpty, remove |
Constructor Detail |
public LinearQueueBase()
Method Detail |
public void add(Object o)
public void addSet(Enumeration e)
public boolean transferTo(Object o, GenericBlockingQueue q)
public String toString()
protected void bulkMoveTest(LinearQueue q)
public void prependUnrolled(LinearQueue q)
This method will default to performing a First to First move. If an Exception is thrown during the move, it will attempt to rollback both Queues to their previous state before rethrowing the Exception.
prependUnrolled
in interface LinearQueue
RuntimeException
- if the move could not be completed
RollbackError
- if neither the move or a rollback could be completedpublic void prependFlat(LinearQueue q)
This method will default to performing a Last to First move. If an Exception is thrown during the move, it will attempt to rollback both Queues to their previous state before rethrowing the Exception.
prependFlat
in interface LinearQueue
RuntimeException
- if the move could not be completed
RollbackError
- if neither the move or a rollback could be completedpublic void appendFlat(LinearQueue q)
This method will default to performing a First to Last move. If an Exception is thrown during the move, it will attempt to rollback both Queues to their previous state before rethrowing the Exception.
appendFlat
in interface LinearQueue
RuntimeException
- if the move could not be completed
RollbackError
- if neither the move or a rollback could be completedpublic void appendUnrolled(LinearQueue q)
This method will default to performing a Last to Last move. If an Exception is thrown during the move, it will attempt to rollback both Queues to their previous state before rethrowing the Exception.
appendUnrolled
in interface LinearQueue
RuntimeException
- if the move could not be completed
RollbackError
- if neither the move or a rollback could be completedpublic void appendFlat(OrderedQueue q)
public void appendUnrolled(OrderedQueue q)
public void prependUnrolled(OrderedQueue q)
public void prependFlat(OrderedQueue q)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |