Class Objects

java.lang.Object
org.forgerock.util.Objects

public final class Objects extends Object
Common utility methods for Objects.
  • Method Details

    • compareValues

      public static int compareValues(Object v1, Object v2)
      Compare two values based on types.
      Parameters:
      v1 - the first object
      v2 - the second object
      Returns:
      the value 0 if this first object is equal to the second argument; a value less than 0 if this object is numerically or lexicographically less than the second argument; and a value greater than 0 if this object is numerically or lexicographically greater than the second argument
    • isCompatible

      public static boolean isCompatible(Object v1, Object v2)
      Returns whether the two objects are type-compatible.
      Parameters:
      v1 - the first object
      v2 - the second object
      Returns:
      true if the objects are type-compatible