| Modifier and Type | Field and Description |
|---|---|
static GraphStructure<Void,Void,Void,Void> |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
Void |
classForNode(Void node)
Finds a node class for
node. |
boolean |
edgeDirect(Void port,
int index)
Checks whether an edge is direct.
|
String |
edgeName(Void port,
int index)
The name of an edge.
|
Collection<? extends Void> |
edgeNodes(Void graph,
Void node,
Void port,
int index)
Nodes where the edges for a port lead to/from.
|
Object |
edgeType(Void port,
int index)
Type of an edge.
|
Void |
graph(Void currentGraph,
Object obj)
Casts
obj to graph, if possible. |
String |
nameTemplate(Void nodeClass)
The template used to build the name of nodes of this class.
|
Void |
node(Object obj)
Finds a node for
obj, if possible. |
Void |
nodeClass(Object obj)
Finds a node class for
obj, if possible. |
Object |
nodeClassType(Void nodeClass)
Java class for a node class.
|
boolean |
nodeHasPredecessor(Void node)
Checks if there is a predecessor for a node.
|
int |
nodeId(Void node)
Id of
node. |
void |
nodeProperties(Void graph,
Void node,
Map<String,? super Object> properties)
Collects node properties.
|
Iterable<? extends Void> |
nodes(Void graph)
Nodes of a graph.
|
int |
nodesCount(Void graph)
Number of nodes in a graph.
|
Void |
portInputs(Void nodeClass)
Input ports of a node class.
|
Void |
portOutputs(Void nodeClass)
Output ports of a node class.
|
int |
portSize(Void port)
The number of edges in a port.
|
public static final GraphStructure<Void,Void,Void,Void> INSTANCE
public Void graph(Void currentGraph, Object obj)
GraphStructureobj to graph, if possible. If the given object obj can be seen as
a graph or sub-graph of a graph, then return the properly typed instance. Otherwise return
nullpublic Iterable<? extends Void> nodes(Void graph)
GraphStructureGraphStructure.nodesCount(java.lang.Object) method.nodes in interface GraphStructure<Void,Void,Void,Void>graph - the graph to query for nodesGraphStructure.nodesCount(java.lang.Object)public int nodesCount(Void graph)
GraphStructureGraphStructure.nodes(java.lang.Object) method.nodesCount in interface GraphStructure<Void,Void,Void,Void>graph - the graph to queryGraphStructure.nodes(java.lang.Object)public int nodeId(Void node)
GraphStructurenode. Each node in the graph is uniquely identified by an integer value. If two
nodes have the same id, then they shall be == to each other.public boolean nodeHasPredecessor(Void node)
GraphStructurenodeHasPredecessor in interface GraphStructure<Void,Void,Void,Void>node - the node to checktrue if it has a predecessor, false otherwisepublic void nodeProperties(Void graph, Void node, Map<String,? super Object> properties)
GraphStructurenodeProperties in interface GraphStructure<Void,Void,Void,Void>graph - the current graphnode - the node to collect properties forproperties - the map to put the properties topublic Void node(Object obj)
GraphStructureobj, if possible. If the given object obj can be seen
as an instance of node return the properly typed instance of the node class. Otherwise return
null.public Void nodeClass(Object obj)
GraphStructureobj, if possible. If the given object obj can be
seen as an instance of node class return the properly typed instance of the node class.
Otherwise return null.public Void classForNode(Void node)
GraphStructurenode.classForNode in interface GraphStructure<Void,Void,Void,Void>node - an instance of node in this graphnullpublic String nameTemplate(Void nodeClass)
GraphStructurenameTemplate in interface GraphStructure<Void,Void,Void,Void>nodeClass - the node class to find name template forpublic Object nodeClassType(Void nodeClass)
GraphStructurenodeClassType in interface GraphStructure<Void,Void,Void,Void>nodeClass - the node classClass or other type representation of the node classpublic Void portInputs(Void nodeClass)
GraphStructureportInputs in interface GraphStructure<Void,Void,Void,Void>nodeClass - the node classpublic Void portOutputs(Void nodeClass)
GraphStructureportOutputs in interface GraphStructure<Void,Void,Void,Void>nodeClass - the node classpublic int portSize(Void port)
GraphStructureGraphStructure.edgeDirect(java.lang.Object, int), GraphStructure.edgeName(java.lang.Object, int),
GraphStructure.edgeType(java.lang.Object, int) and
GraphStructure.edgeNodes(java.lang.Object, java.lang.Object, java.lang.Object, int) for indexes
from 0 to portSize - 1public boolean edgeDirect(Void port, int index)
GraphStructureedgeDirect in interface GraphStructure<Void,Void,Void,Void>port - the portindex - index from 0 to GraphStructure.portSize(java.lang.Object) minus
1true if only one node can be returned from
GraphStructure.edgeNodes(java.lang.Object, java.lang.Object, java.lang.Object, int) methodpublic String edgeName(Void port, int index)
GraphStructureedgeName in interface GraphStructure<Void,Void,Void,Void>port - the portindex - index from 0 to GraphStructure.portSize(java.lang.Object) minus
1public Object edgeType(Void port, int index)
GraphStructureenum- e.g. either real instance of
Enum subclass, or something that the
GraphOutput.Builder can recognize as
enum.
edgeType in interface GraphStructure<Void,Void,Void,Void>index - index from 0 to GraphStructure.portSize(java.lang.Object) minus
1Enum representing type of the edgepublic Collection<? extends Void> edgeNodes(Void graph, Void node, Void port, int index)
GraphStructuredirect/non-direct edges. In case of a direct edge
the returned collection must have exactly one element.edgeNodes in interface GraphStructure<Void,Void,Void,Void>graph - the graphnode - the node in the graphport - port of the node classindex - index from 0 to GraphStructure.portSize(java.lang.Object) minus
1null if there are no edges associated with given port or collection of
nodes where to/from the edges lead to