Class OPS.OpsPrecedenceComparator

  • All Implemented Interfaces:
    java.util.Comparator<OPS>
    Enclosing class:
    OPS

    public static class OPS.OpsPrecedenceComparator
    extends java.lang.Object
    implements java.util.Comparator<OPS>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(OPS ops, OPS ops1)
      The order we want to apply Defaultr logic is Literals, Or, and then Star.
      • Methods inherited from class java.lang.Object

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

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • OpsPrecedenceComparator

        public OpsPrecedenceComparator()
    • Method Detail

      • compare

        public int compare​(OPS ops,
                           OPS ops1)
        The order we want to apply Defaultr logic is Literals, Or, and then Star. Since we walk the sorted data from 0 to n, that means Literals need to low, and Star should be high.
        Specified by:
        compare in interface java.util.Comparator<OPS>