Package com.uppaal.model.core2
Class SetPropertyCommand
java.lang.Object
com.uppaal.model.core2.AbstractCommand
com.uppaal.model.core2.SetPropertyCommand
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
SetPropertyWithPositionCommand
public class SetPropertyCommand extends AbstractCommand
The set property command
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SetPropertyCommand(Element element, String name, Object value)Constructor -
Method Summary
Modifier and Type Method Description voidexecute()protected PropertygetLocalProperty()Get local propertyprotected ObjectgetLocalPropertyValue()Get local property valueElementgetModifiedElement()protected Objectswap()Swap the objectvoidundo()
-
Field Details
-
Constructor Details
-
SetPropertyCommand
Constructor- Parameters:
element- - The element objectname- - The namevalue- - The value
-
-
Method Details
-
execute
public void execute() -
undo
public void undo() -
swap
Swap the object- Returns:
- The old object
-
getLocalProperty
Get local property- Returns:
- The local property
-
getLocalPropertyValue
Get local property value- Returns:
- The local property value
-
getModifiedElement
- Returns:
- the modified element or its closest relative (sibling or parent) if the element is not displayed.
-