Package com.uppaal.model.core2
Class Template
java.lang.Object
com.uppaal.model.core2.Element
com.uppaal.model.core2.Node
com.uppaal.model.core2.AbstractTemplate
com.uppaal.model.core2.Template
- All Implemented Interfaces:
Serializable
,Cloneable
public class Template extends AbstractTemplate
The timed automaton template class
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Object
clone()
Returns a deep clone of the template.BranchPoint
createBranchPoint()
Create a new branch point with this template as the parent and optionally a prototype according to the '#branchpoint' property of the template.Edge
createEdge()
Create a new edge with this template as the parent and optionally a prototype according to the '#edge' property of the template.Location
createLocation()
Create a new location with this template as the parent and optionally a prototype according to the '#location' property of the template.Element
getPrototypeFromParent(Element parent)
Return the proper prototype for this element stored in the parent.Methods inherited from class com.uppaal.model.core2.Node
getFirst, getLast, getNext, getPrevious, getXPathTag, insert, move, remove, setPrototype
Methods inherited from class com.uppaal.model.core2.Element
acceptSafe, addListener, getColor, getCommandManager, getDocument, getLocalProperty, getParent, getProperties, getProperty, getPropertyValue, getPrototype, getX, getXMLLabelKinds, getXPath, getY, hasFlag, importInto, isPropertyLocal, removeListener, setCommandManager, setProperties, setProperty, setPropertyFromPath
-
Constructor Details
-
Template
Constructor- Parameters:
prototype
- - The prototype
-
-
Method Details
-
createLocation
Create a new location with this template as the parent and optionally a prototype according to the '#location' property of the template. The new location is not inserted into the tree!- Returns:
- The new location
-
createBranchPoint
Create a new branch point with this template as the parent and optionally a prototype according to the '#branchpoint' property of the template. The new branch point is not inserted into the tree!- Returns:
- The new branch point
-
createEdge
Create a new edge with this template as the parent and optionally a prototype according to the '#edge' property of the template. The new edge is not inserted into the tree!- Returns:
- a newly constructed edge.
-
getPrototypeFromParent
Description copied from class:Element
Return the proper prototype for this element stored in the parent. This is used by importInto().- Specified by:
getPrototypeFromParent
in classAbstractTemplate
- Parameters:
parent
- - The parent element- Returns:
- the #template property value of the parent argument.
-
clone
Returns a deep clone of the template. The source and target of any edges in the template are set to the corresponding clones of the locations of the template.- Overrides:
clone
in classAbstractTemplate
- Returns:
- The cloned object
- Throws:
CloneNotSupportedException
- the object could not be cloned.
-