public class IdMapOperation extends AbstractOperation implements Serializable
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Constructor and Description |
---|
IdMapOperation(int sourceId,
int targetId,
int number)
Creates a simple operation mapping the input to the output ID.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRun()
Checks if all prerequisiting fields do exist or can be provided by a subsequent
operation.
|
int[] |
execute(int[] id)
Executes the operation and sets at least the provided set of id.
|
int[] |
getInputId()
Gets all ids which are required to execute this operation.
|
int[] |
getOutputId()
Gets all ids which are written by this operation.
|
String |
toString() |
getIdentity, getUsagePeriod, isInUsagePeriod, setInternalPayload, setUsagePeriod
public static final long serialVersionUID
public IdMapOperation(int sourceId, int targetId, int number)
Creates a simple operation mapping the input to the output ID.
sourceId
- the first source ID to be mappedtargetId
- the first target ID to be mappednumber
- the number of subsequent blocks to be mappedpublic int[] getOutputId()
Operation
Gets all ids which are written by this operation.
getOutputId
in interface Operation
public int[] getInputId()
Operation
Gets all ids which are required to execute this operation.
getInputId
in interface Operation
public boolean canRun()
Operation
Checks if all prerequisiting fields do exist or can be provided by a subsequent operation.
canRun
in interface Operation
canRun
in class AbstractOperation
public int[] execute(int[] id)
Operation
Executes the operation and sets at least the provided set of id.
This operation might trigger to execute prerequisiting operations.
execute
in interface Operation
execute
in class AbstractOperation
id
- the namespace id to be set minimallyCopyright © 2023. All rights reserved.