psdi.webclient.applet.wfcanvas.diagram

Class RelationshipComparator

  • java.lang.Object
    • psdi.webclient.applet.wfcanvas.diagram.RelationshipComparator
  • All Implemented Interfaces:
    java.util.Comparator


    public class RelationshipComparator
    extends java.lang.Object
    implements java.util.Comparator
    This class defines a comparator for use with 'TreeSet' It sorts the relationships by enter or exit order
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected int type 
    • Constructor Summary

      Constructors 
      Constructor and Description
      RelationshipComparator(int type)
      Constructs the RelationshipComparator
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int compare(java.lang.Object o1, java.lang.Object o2)
      Compare 2 relationships;
      boolean equals(java.lang.Object o)
      Compare 2 objects for equality
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Field Detail

      • type

        protected int type
    • Constructor Detail

      • RelationshipComparator

        public RelationshipComparator(int type)
        Constructs the RelationshipComparator
        Parameters:
        type - The type to sort by
    • Method Detail

      • compare

        public int compare(java.lang.Object o1,
                           java.lang.Object o2)
        Compare 2 relationships;
        Specified by:
        compare in interface java.util.Comparator
        Parameters:
        o1 - First object to compare
        o2 - Second object to compare
        Returns:
        The result of the comparison
      • equals

        public boolean equals(java.lang.Object o)
        Compare 2 objects for equality
        Specified by:
        equals in interface java.util.Comparator
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - Object to compare to this
        Returns:
        True if equal , false otherwise