Class Operator


  • public class Operator
    extends java.lang.Object
    The operator class contains the implementation of all operators for evaluating two values.
    • Constructor Summary

      Constructors 
      Constructor Description
      Operator()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static int compare​(java.lang.Object val1, java.lang.Object val2)
      Compare two values.
      protected static boolean contains​(java.lang.Object val1, java.lang.Object val2)
      Test if a collection contains a value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Operator

        public Operator()
    • Method Detail

      • compare

        protected static int compare​(java.lang.Object val1,
                                     java.lang.Object val2)
        Compare two values.
        Parameters:
        val1 - The first value.
        val2 - The second value.
        Returns:
        A negative integer, zero, or a positive integer as the first value is less than, equal to, or greater than the second value.
        Throws:
        java.lang.ClassCastException - when the values are not comparable.
      • contains

        protected static boolean contains​(java.lang.Object val1,
                                          java.lang.Object val2)
        Test if a collection contains a value.
        Parameters:
        val1 - The collection.
        val2 - The value to test.
        Returns:
        True, if contained.