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
All Methods Instance Methods Concrete Methods 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()
-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, merge, 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.
-
-