Package com.uppaal.model.core2
Class RemoveTextCommand
- java.lang.Object
-
- com.uppaal.model.core2.AbstractCommand
-
- com.uppaal.model.core2.RemoveTextCommand
-
- All Implemented Interfaces:
Command
public class RemoveTextCommand extends AbstractCommand
Inserts text into a property value at specified position
-
-
Constructor Summary
Constructors Constructor Description RemoveTextCommand(Property property, int position, int length)
Command to remove text at specific location
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
int
getBeginIndex()
int
getEndIndex()
Element
getModifiedElement()
boolean
merge(Command next)
attempt to merge another insertion into the same commandvoid
undo()
-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, setVersion
-
-
-
-
Constructor Detail
-
RemoveTextCommand
public RemoveTextCommand(Property property, int position, int length)
Command to remove text at specific location- Parameters:
property
- the property holding the valueposition
- the beginning of the text to removelength
- the length of the text to remove
-
-
Method Detail
-
execute
public void execute()
-
merge
public boolean merge(Command next)
attempt to merge another insertion into the same command- Specified by:
merge
in interfaceCommand
- Overrides:
merge
in classAbstractCommand
- Parameters:
next
- the next command to be stored together- Returns:
- true if merge is successful, otherwise the command needs to be stored separately
-
undo
public void undo()
-
getModifiedElement
public Element getModifiedElement()
- Returns:
- the modified element or its closest relative (sibling or parent) if the element is not displayed.
-
getBeginIndex
public int getBeginIndex()
-
getEndIndex
public int getEndIndex()
-
-