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, java.lang.String name, java.lang.Object value)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()protected PropertygetLocalProperty()Get local propertyprotected java.lang.ObjectgetLocalPropertyValue()Get local property valueElementgetModifiedElement()protected java.lang.Objectswap()Swap the objectvoidundo()-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, setVersion
-
-
-
-
Constructor Detail
-
SetPropertyCommand
public SetPropertyCommand(Element element, java.lang.String name, java.lang.Object value)
Constructor- Parameters:
element- - The element objectname- - The namevalue- - The value
-
-
Method Detail
-
execute
public void execute()
-
undo
public void undo()
-
swap
protected java.lang.Object swap()
Swap the object- Returns:
- The old object
-
getLocalProperty
protected Property getLocalProperty()
Get local property- Returns:
- The local property
-
getLocalPropertyValue
protected java.lang.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.
-
-