|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.common.actions.BasicModificationActionQueue
public class BasicModificationActionQueue
This class is the basic and default implementation of the ModificationActionQueue interface. This implementation has no limit to the number of actions that can be put into the queue, and is fully synchronized for concurrent access.
| Constructor Summary | |
|---|---|
BasicModificationActionQueue()
Create an instance of the modification action queue. |
|
| Method Summary | |
|---|---|
boolean |
addAction(ActionDefinition newAction)
Add to the end of this queue a modification action. |
int |
addActions(java.util.List newActions)
Moved to the end of this queue the list of modification actions. |
int |
addActions(ModificationActionQueue queue)
Moved to the end of this queue the modification actions in the specified queue. |
void |
clear()
Remove all of the actions that are currently in this queue. |
int |
getActionCount()
Return the number of actions that are currently in this queue. |
java.util.List |
getActions()
Return an unmodifiable copy of the list of actions in this queue, possibly empty but never null |
ActionDefinition |
getLast()
Return a clone of the last modification action object that was added to this queue. |
boolean |
hasActions()
Return whether this queue has at least one modification action. |
java.util.List |
popActions()
Remove all of the modification objects that are in the queue and return them. |
java.util.List |
popActions(int count)
Remove the specified number of modification objects that are in the queue and return them. |
ActionDefinition |
removeLast()
Remove and return the last modification action object that was added to this queue. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicModificationActionQueue()
| Method Detail |
|---|
public java.util.List popActions()
popActions in interface ModificationActionQueuepublic java.util.List popActions(int count)
popActions in interface ModificationActionQueuecount - the number of modification action objects to remove from the queue; if greater than
the number of actions in this queue, all of the actions are popped.
public ActionDefinition getLast()
throws java.util.NoSuchElementException
getLast in interface ModificationActionQueuejava.util.NoSuchElementException - if this queue is empty.
public ActionDefinition removeLast()
throws java.util.NoSuchElementException
removeLast in interface ModificationActionQueuejava.util.NoSuchElementException - if this queue is empty.public boolean addAction(ActionDefinition newAction)
addAction in interface ModificationActionQueuenewAction - the new modification action that is to be added to this queue.
java.lang.IllegalArgumentException - if the new action is null.public int addActions(java.util.List newActions)
addActions in interface ModificationActionQueueordered - list of actions to be added to this queue.
java.lang.IllegalArgumentException - if the new action is null.public int addActions(ModificationActionQueue queue)
addActions in interface ModificationActionQueuequeue - the queue from with all actions are to be removed and added
to this queue.
java.lang.IllegalArgumentException - if the new action is null.public java.util.List getActions()
getActions in interface ModificationActionQueuepublic int getActionCount()
getActionCount in interface ModificationActionQueuepublic boolean hasActions()
hasActions in interface ModificationActionQueuepublic void clear()
clear in interface ModificationActionQueuepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||