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.
|
void |
offer(Operation operation)
Add a new operation to the queue.
|
Operation |
resume(RunContext run)
Complete the next step.
|
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.