public class WorkflowUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTROL_FLOW |
static String |
DATA_FLOW |
static String |
EVENT_FLOW |
| Modifier and Type | Method and Description |
|---|---|
static List<ConnectionResult> |
connect(Connector s,
Connector r) |
static Predicate<Connector> |
connectorConnected(String connectionType)
Returns a predicate that indicates whether a connector is connected with
the specified connection type.
|
static Predicate<Connector> |
connectorNotConnected(String connectionType)
Returns a predicate that indicates whether a connector is not connected
with the specified connection type.
|
static List<VFlowModel> |
getAncestors(VNode n)
Returns the ancestors of the specified node.
|
static Optional<VFlowModel> |
getCommonAncestor(VNode n1,
VNode n2)
Returns the first common ancestor of the specified nodes if such a parent node
exists.
|
static List<VNode> |
getPathInLayerFromRoot(VNode sender,
String connectionType) |
static boolean |
isRoot(VNode node,
String connectionType) |
static Predicate<Connector> |
lessThanConnections(int expectedNumConn,
String connectionType)
Returns a predicate that indicates whether the number of connections of
the specified connector is smaller than the expected number of
connections.
|
static Predicate<Connector> |
moreThanConnections(int expectedNumConn,
String connectionType)
Returns a predicate that indicates whether the number of connections of
the specified connector is bigger than the expected number of
connections.
|
static Predicate<VNode> |
nodeConnected(String connectionType)
Returns a predicate that indicates whether a node is connected with the
specified connection type.
|
static Predicate<VNode> |
nodeNotConnected(String connectionType)
Returns a predicate that indicates whether a node is not connected with
the specified connection type.
|
static Predicate<Connector> |
numberOfConnections(int expectedNumConn,
String connectionType)
Returns a predicate that indicates whether the number of connections of
the specified connector is equal to the expected number of connections.
|
public static final String CONTROL_FLOW
public static final String DATA_FLOW
public static final String EVENT_FLOW
public static Predicate<Connector> connectorConnected(String connectionType)
connectionType - connection type (e.g. "data" or "control")Streampublic static Predicate<Connector> connectorNotConnected(String connectionType)
connectionType - connection type (e.g. "data" or "control")Streampublic static Predicate<VNode> nodeConnected(String connectionType)
connectionType - connection type (e.g. "data" or "control")Streampublic static Predicate<VNode> nodeNotConnected(String connectionType)
connectionType - connection type (e.g. "data" or "control")Streampublic static Predicate<Connector> moreThanConnections(int expectedNumConn, String connectionType)
expectedNumConn - expected number of connectionsconnectionType - connection type (e.g. "data" or "control")Streampublic static Predicate<Connector> lessThanConnections(int expectedNumConn, String connectionType)
expectedNumConn - expected number of connectionsconnectionType - connection type (e.g. "data" or "control")Streampublic static Predicate<Connector> numberOfConnections(int expectedNumConn, String connectionType)
expectedNumConn - expected number of connectionsconnectionType - connection type (e.g. "data" or "control")Streampublic static List<VNode> getPathInLayerFromRoot(VNode sender, String connectionType)
public static List<ConnectionResult> connect(Connector s, Connector r)
public static List<VFlowModel> getAncestors(VNode n)
n - nodepublic static Optional<VFlowModel> getCommonAncestor(VNode n1, VNode n2)
n1 - first noden2 - second node