psdi.workflow.diagram

Class WorkflowRelationshipExit

  • java.lang.Object
    • psdi.workflow.diagram.WorkflowRelationshipExit
  • All Implemented Interfaces:
    java.lang.Comparable


    public class WorkflowRelationshipExit
    extends java.lang.Object
    implements java.lang.Comparable

    This class holds a the exit relationship in the workflow

    • Constructor Detail

      • WorkflowRelationshipExit

        public WorkflowRelationshipExit(WorkflowRelationship workflowRelationship)
        Constrsucts a WorkflowRelationshipExit object. This allows sorting of relationships with respect their position leaving a node.
        Parameters:
        workflowRelationship - The workflow relationship to encapsulate
    • Method Detail

      • getWorkflowRelationship

        public WorkflowRelationship getWorkflowRelationship()
        Returns the workflow relationship
        Returns:
        the workflow relationship
      • equals

        public boolean equals(java.lang.Object o)
        Compares 2 relationships for equality
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - The object to compare to
        Returns:
        True if teh same and false otherwise
      • compareTo

        public int compareTo(java.lang.Object o)
        Compares 2 relationships for the Comparable interface
        Specified by:
        compareTo in interface java.lang.Comparable
        Parameters:
        o - The object to compare to
        Returns:
        negative value if less than passed object,zero if equals and positive value if greater
      • getIndex

        protected int getIndex()
        Calculates the index of the relationship for sorting purposes. The lines are sorted into bands as follows
         
              backward lines above
              forward  lines above
              forward  lines below
              backward lines below
              
         
        Within each in each the lines are sorted row and column within row. For above lines the lines furthest away vertically sort to the top. For below the opposite applies. With in a matching row the lines sort by column.
        Returns:
        The sort index