warnedDeprecatedClasses
Constructor and Description |
---|
OperationQueue()
Create a new queue containing no operations.
|
OperationQueue(java.util.Collection<Operation> operations)
Create a new queue with operations from the given collection.
|
OperationQueue(Operation... operation)
Create a new queue with operations from the given array.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Abort the current task.
|
java.lang.Iterable<com.sk89q.worldedit.util.formatting.text.Component> |
getStatusMessages()
Gets an iterable of messages that describe the current status of the
operation.
|
void |
offer(Operation operation)
Add a new operation to the queue.
|
Operation |
resume(RunContext run)
Complete the next step.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addStatusMessages
public OperationQueue()
public OperationQueue(java.util.Collection<Operation> operations)
operations
- a collection of operationspublic OperationQueue(Operation... operation)
operation
- an array of operationspublic void offer(Operation operation)
operation
- the operationpublic Operation resume(RunContext run) throws WorldEditException
Operation
resume
in interface Operation
run
- describes information about the current runWorldEditException
- an errorpublic void cancel()
Operation
Operation.resume(RunContext)
should not be called at any point in the
future. This method should not be called after successful completion of
the operation. This method must be called if the operation is
interrupted before completion.public java.lang.Iterable<com.sk89q.worldedit.util.formatting.text.Component> getStatusMessages()
Operation
getStatusMessages
in interface Operation