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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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

  • Method Details

    • statusAllowed

      boolean statusAllowed(OppEdge edge, String newStatus)
      Check whether the edge is allowed to change its status.
      Parameters:
      edge - the edge with its previous status
      newStatus - the status that edge will have if allowed
      Returns:
      true if the new status is allowed for the edge
    • nodeStatus

      String[] nodeStatus(OppEdge edge, String command)
      Compute the new node status according to the edge status.
      Parameters:
      edge - an edge between the nodes
      command - the command that just occured for the edge (ADDED/REMOVED/CHANGED)
      Returns:
      {sourceNodeStatus, targetNodeStatus} or null if the status are not changed