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
-
-
Method Summary
Modifier and Type Method Description Objectclone()Returns a deep clone of the template.BranchPointcreateBranchPoint()Create a new branch point with this template as the parent and optionally a prototype according to the '#branchpoint' property of the template.EdgecreateEdge()Create a new edge with this template as the parent and optionally a prototype according to the '#edge' property of the template.LocationcreateLocation()Create a new location with this template as the parent and optionally a prototype according to the '#location' property of the template.ElementgetPrototypeFromParent(Element parent)Return the proper prototype for this element stored in the parent.-
Methods inherited from class com.uppaal.model.core2.AbstractTemplate
accept, getTemplate
-
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 Detail
-
Template
public Template(Element prototype)
Constructor- Parameters:
prototype- - The prototype
-
-
Method Detail
-
createLocation
public Location 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
public 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. The new branch point is not inserted into the tree!- Returns:
- The new branch point
-
createEdge
public Edge 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
public Element getPrototypeFromParent(Element parent)
Description copied from class:ElementReturn the proper prototype for this element stored in the parent. This is used by importInto().- Specified by:
getPrototypeFromParentin classAbstractTemplate- Parameters:
parent- - The parent element- Returns:
- the #template property value of the parent argument.
-
clone
public Object clone() throws CloneNotSupportedException
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:
clonein classAbstractTemplate- Returns:
- The cloned object
- Throws:
CloneNotSupportedException- the object could not be cloned.
-
-