java.lang.Object
org.apache.ofbiz.minilang.method.conditional.Compare

public abstract class Compare extends Object
Implements a comparison - consisting of an l-value, an r-value, and a comparison operator.
  • Constructor Details

    • Compare

      public Compare()
  • Method Details

    • getInstance

      public static Compare getInstance(String operator)
      Returns a Compare instance for the specified operator.
      Parameters:
      operator -
      Returns:
      A Compare instance for the specified operator
    • doCompare

      public abstract boolean doCompare(Object lValue, Object rValue, Class<?> type, Locale locale, TimeZone timeZone, String format) throws Exception
      Returns the result of this comparison.
      Parameters:
      lValue - The object being compared
      rValue - The object being compared to
      type - The Java class to be used in the comparison
      format - Optional format to be used in object type conversions
      locale - Optional locale to be used in object type conversions
      timeZone - Optional time zone to be used in object type conversions
      Returns:
      The result of this comparison
      Throws:
      Exception