Class ComparisonFunctions


  • @CheckReturnValue
    @Internal
    public final class ComparisonFunctions
    extends java.lang.Object
    The ComparisonFunctions methods provide safe cross-type comparisons between long, double, and UnsignedLong values.

    CEL Library Internals. Do Not Use.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int compareDoubleInt​(double d, long l)  
      static int compareDoubleUint​(double d, com.google.common.primitives.UnsignedLong ul)  
      static int compareIntDouble​(long l, double d)  
      static int compareIntUint​(long l, com.google.common.primitives.UnsignedLong ul)  
      static int compareUintDouble​(com.google.common.primitives.UnsignedLong ul, double d)  
      static int compareUintInt​(com.google.common.primitives.UnsignedLong ul, long l)  
      static boolean numericEquals​(java.lang.Number x, java.lang.Number y)
      Compare two numeric values of any type (double, int, uint) for equality.
      • Methods inherited from class java.lang.Object

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

      • compareDoubleInt

        public static int compareDoubleInt​(double d,
                                           long l)
      • compareIntDouble

        public static int compareIntDouble​(long l,
                                           double d)
      • compareDoubleUint

        public static int compareDoubleUint​(double d,
                                            com.google.common.primitives.UnsignedLong ul)
      • compareUintDouble

        public static int compareUintDouble​(com.google.common.primitives.UnsignedLong ul,
                                            double d)
      • compareIntUint

        public static int compareIntUint​(long l,
                                         com.google.common.primitives.UnsignedLong ul)
      • compareUintInt

        public static int compareUintInt​(com.google.common.primitives.UnsignedLong ul,
                                         long l)
      • numericEquals

        public static boolean numericEquals​(java.lang.Number x,
                                            java.lang.Number y)
        Compare two numeric values of any type (double, int, uint) for equality.

        Floating point values are follow IEEE 754 standard for NaN comparisons.