Package org.esa.snap.core.util
Class ObjectUtils
java.lang.Object
org.esa.snap.core.util.ObjectUtils
This utility class provides several useful
Object
-related methods.
All functions have been implemented with extreme caution in order to provide a maximum performance.
- Version:
- $Revision$ $Date$
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
equalObjects
(Object object1, Object object2) Indicates whether the given objects are "equal to" each other.
-
Method Details
-
equalObjects
Indicates whether the given objects are "equal to" each other.This method should be used in place of the
Object.equals
if one ore both arguments can benull
.If both objects are arrays of the same primitive types the comparision is delegated to the corresponding
java.util.Arrays.equals
method.If both objects are object arrays with equal lengths, the method is recursively called for each array element pair. If the first pair is not equal, the method immediately returns
false
.- Parameters:
object1
- the first object, can benull
object2
- the second object, can also benull
- Returns:
true
if this first object equals the second;false
otherwise.- See Also:
-