Package com.uppaal.model.core2
Class SetSourceCommand
- java.lang.Object
-
- com.uppaal.model.core2.AbstractCommand
-
- com.uppaal.model.core2.AbstractTransaction
-
- com.uppaal.model.core2.SetEndPointCommand
-
- com.uppaal.model.core2.SetSourceCommand
-
- All Implemented Interfaces:
Command
public class SetSourceCommand extends SetEndPointCommand
Transaction for changing the source of an edge.
-
-
Field Summary
-
Fields inherited from class com.uppaal.model.core2.SetEndPointCommand
edge, location, nail
-
Fields inherited from class com.uppaal.model.core2.AbstractTransaction
commandManager, committed
-
Fields inherited from class com.uppaal.model.core2.AbstractCommand
version
-
-
Constructor Summary
Constructors Constructor Description SetSourceCommand(CommandManager commandManager, Edge edge)Constructor
-
Method Summary
Modifier and Type Method Description AbstractLocationgetLocation()Returns the current end point.protected voidinsertNail(Nail nail)Inserts a nail next to the end point.protected voidsetLocation(AbstractLocation location)Sets the current end point on the edge.-
Methods inherited from class com.uppaal.model.core2.SetEndPointCommand
convertToNail, doCancel, doExecute, doUndo, getModifiedElement, moveNailTo, setEndPoint, swap
-
Methods inherited from class com.uppaal.model.core2.AbstractTransaction
cancel, commit, execute, move, undo
-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, setVersion
-
-
-
-
Constructor Detail
-
SetSourceCommand
public SetSourceCommand(CommandManager commandManager, Edge edge)
Constructor- Parameters:
commandManager- - The command manageredge- - The edge
-
-
Method Detail
-
getLocation
public AbstractLocation getLocation()
Description copied from class:SetEndPointCommandReturns the current end point.- Specified by:
getLocationin classSetEndPointCommand- Returns:
- The abstract location
-
setLocation
protected void setLocation(AbstractLocation location)
Description copied from class:SetEndPointCommandSets the current end point on the edge.- Specified by:
setLocationin classSetEndPointCommand- Parameters:
location- - The set location
-
insertNail
protected void insertNail(Nail nail)
Description copied from class:SetEndPointCommandInserts a nail next to the end point.- Specified by:
insertNailin classSetEndPointCommand- Parameters:
nail- - The nail object
-
-