Package casa.lepton
Interface OppNetRules
public interface OppNetRules
Interface defining some methods that may be used by a
OppNetGraph
to
follow some rules while changing the edge/node status.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionString[]
nodeStatus
(OppEdge edge, String command) Compute the new node status according to the edge status.boolean
statusAllowed
(OppEdge edge, String newStatus) Check whether the edge is allowed to change its status.
-
Field Details
-
ADDED
- See Also:
-
REMOVED
- See Also:
-
CHANGED
- See Also:
-
-
Method Details
-
statusAllowed
Check whether the edge is allowed to change its status.- Parameters:
edge
- the edge with its previous statusnewStatus
- the status that edge will have if allowed- Returns:
- true if the new status is allowed for the edge
-
nodeStatus
Compute the new node status according to the edge status.- Parameters:
edge
- an edge between the nodescommand
- the command that just occured for the edge (ADDED/REMOVED/CHANGED)- Returns:
- {sourceNodeStatus, targetNodeStatus} or null if the status are not changed
-