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 void
execute()
protected Property
getLocalProperty()
Get local propertyprotected Object
getLocalPropertyValue()
Get local property valueElement
getModifiedElement()
protected Object
swap()
Swap the objectvoid
undo()
-
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.
-