public abstract class Edit
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Position |
basePosition
Position in a data tree the operation should be performed at.
|
Modifier | Constructor and Description |
---|---|
protected |
Edit(Position basePosition)
Initializes the common items of the edit operation structure.
|
Modifier and Type | Method and Description |
---|---|
void |
applyRootCutting()
Applies the modCut modification of the base position.
|
void |
applyRootPrepending(java.lang.Integer prefixItem)
Applies the modPre modification of the base position.
|
void |
applyRootShifting(int incrementValue)
Applies the modAlt modification of the base position.
|
abstract Edit |
cloneIdenticalOperation()
Creates an independent clone of the edit operation.
|
static java.util.List<Edit> |
cloneIdenticalSequence(java.util.List<Edit> sourceList)
Creates an independent clone of all source operations.
|
static void |
cloneIdenticalSequenceAfter(java.util.List<Edit> sourceList,
java.util.List<Edit> outputList)
Creates an independent clone of all source operations.
|
static void |
cloneIdenticalSequenceBefore(java.util.List<Edit> sourceList,
java.util.List<Edit> outputList)
Creates an independent clone of all source operations.
|
abstract Edit |
cloneShiftedOperation(int incrementValue)
Creates an independent clone of the edit with applied modAlt.
|
static void |
cloneShiftedSequence(java.util.List<Edit> sourceList,
java.util.List<Edit> outputList,
int incrementValue)
Creates an independent and shifted clone of all source operations.
|
Position |
getBasePosition()
Returns the base position of the edit operation.
|
int |
getOperationCost()
Returns the cost of the edit operation.
|
abstract java.lang.String |
getOperationTitle()
Returns the human readable name of the operation.
|
Instruction.Type |
getOperationType()
Returns the type of the edit operation.
|
abstract Instruction |
getRepairingInstruction()
Returns the untyped reference to the repairing instruction.
|
protected Position basePosition
protected Edit(Position basePosition)
basePosition
- Base position in a data tree.public abstract Instruction getRepairingInstruction()
public Instruction.Type getOperationType()
public int getOperationCost()
public Position getBasePosition()
public abstract java.lang.String getOperationTitle()
public void applyRootPrepending(java.lang.Integer prefixItem)
prefixItem
- Simple position to be prepended.public void applyRootShifting(int incrementValue)
incrementValue
- Value to be added to the first simple position.public void applyRootCutting()
public abstract Edit cloneIdenticalOperation()
public abstract Edit cloneShiftedOperation(int incrementValue)
incrementValue
- Shifting size to increment base positions.public static java.util.List<Edit> cloneIdenticalSequence(java.util.List<Edit> sourceList)
sourceList
- Input container with operations to be cloned.public static void cloneIdenticalSequenceAfter(java.util.List<Edit> sourceList, java.util.List<Edit> outputList)
sourceList
- Input container with operations to be cloned.outputList
- Output container for placing created clones.public static void cloneIdenticalSequenceBefore(java.util.List<Edit> sourceList, java.util.List<Edit> outputList)
sourceList
- Input container with operations to be cloned.outputList
- Output container for placing created clones.public static void cloneShiftedSequence(java.util.List<Edit> sourceList, java.util.List<Edit> outputList, int incrementValue)
sourceList
- Input container with operations to be cloned.outputList
- Output container for placing created clones.incrementValue
- Shifting size to increment base positions.