Package org.forgerock.util
Class Objects
java.lang.Object
org.forgerock.util.Objects
Common utility methods for Objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
compareValues
(Object v1, Object v2) Compare two values based on types.static boolean
isCompatible
(Object v1, Object v2) Returns whether the two objects are type-compatible.
-
Method Details
-
compareValues
Compare two values based on types.- Parameters:
v1
- the first objectv2
- 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
Returns whether the two objects are type-compatible.- Parameters:
v1
- the first objectv2
- the second object- Returns:
- true if the objects are type-compatible
-