Package org.graphwalker.core.model
Class Model.RuntimeModel
java.lang.Object
org.graphwalker.core.model.RuntimeBase
org.graphwalker.core.model.Model.RuntimeModel
- All Implemented Interfaces:
Element
- Enclosing class:
Model
RuntimeModel
Immutable class for Model An immutable model guarantees that that the internal states of the instance will not change after it's construction.-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ElementVisitor visitor) TODO: Doc...booleanSearches the model for edges matching the search string.findElements(String name) Searches the model for any element matching the search string.findVertices(String name) Searches the model vertices that matches search string.getEdges()Gets the all edges in the model.getElementById(String id) Will return the element with the given id.Will return a list of all elements in a model.getElements(Element element) TODO: Add docgetInEdges(Vertex.RuntimeVertex vertex) For the given vertex, all in-edges will be returned.getOutEdges(Vertex.RuntimeVertex vertex) For the given vertex, all out-edges will be returned.Gets the unique list of shared state names.getSharedStates(String sharedState) Gets the list of vertices that matches a shared state name.Gets the list of vertices of the model.inthashCode()booleanbooleanhasSharedState(String sharedState) Will search in the model if there is a vertex that has a shared state name that matches the given name.booleanWill search the model for vertices that has shared states.Methods inherited from class org.graphwalker.core.model.RuntimeBase
getActions, getId, getName, getProperties, getProperty, getRequirements, hasActions, hasId, hasName, hasProperties, hasProperty, hasRequirements
-
Method Details
-
getVertices
Gets the list of vertices of the model.- Returns:
- The list of vertices
- See Also:
-
findVertices
Searches the model vertices that matches search string.- Parameters:
name- The name of the vertex as a string.- Returns:
- The list of matching vertices.
- See Also:
-
getInEdges
For the given vertex, all in-edges will be returned. Any edge that has a target vertex that is identical to vertex, will be returned.- Parameters:
vertex- The vertex to match- Returns:
- List of matching in-edges.
-
getEdges
Gets the all edges in the model.- Returns:
- A list of edges.
-
getOutEdges
For the given vertex, all out-edges will be returned. Any edge that has a source vertex that is identical to vertex, will be returned.- Parameters:
vertex- The vertex to match- Returns:
- List of matching out-edges.
-
findEdges
Searches the model for edges matching the search string. Any edge that has a matching name, will be returned.- Parameters:
name- The name of edges to be matched.- Returns:
- The list of matching edges.
- See Also:
-
getPredefinedPath
-
hasPredefinedPath
public boolean hasPredefinedPath() -
findElements
Searches the model for any element matching the search string. Any element that has a matching name, will be returned. An element can be either an edge or a vertex.- Parameters:
name- The name of elements to be matched.- Returns:
- The list of matching elements.
- See Also:
-
getElements
Will return a list of all elements in a model. The list will contain all edges and vertices in the model.- Returns:
- The list of all elements in the model.
-
getElementById
Will return the element with the given id.- Parameters:
id- The id of the element.- Returns:
- The element with the given id
-
getElements
TODO: Add doc -
accept
TODO: Doc... -
hashCode
public int hashCode()- Overrides:
hashCodein classRuntimeBase
-
equals
- Overrides:
equalsin classRuntimeBase
-