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
-
-
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()-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, setVersion
-
-
-
-
Method Detail
-
execute
public void execute()
-
undo
public void undo()
-
swap
protected Object swap()
Swap the object- Returns:
- The old object
-
getLocalProperty
protected Property getLocalProperty()
Get local property- Returns:
- The local property
-
getLocalPropertyValue
protected Object getLocalPropertyValue()
Get local property value- Returns:
- The local property value
-
getModifiedElement
public Element getModifiedElement()
- Returns:
- the modified element or its closest relative (sibling or parent) if the element is not displayed.
-
-