public final class ObjectUtils extends Object
Object
-related methods.
All functions have been implemented with extreme caution in order to provide a maximum performance.
Modifier and Type | Method and Description |
---|---|
static boolean |
equalObjects(Object object1,
Object object2)
Indicates whether the given objects are "equal to" each other.
|
public static boolean equalObjects(Object object1, Object object2)
This method should be used in place of the Object.equals
if one ore both arguments can be
null
.
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
.
object1
- the first object, can be null
object2
- the second object, can also be null
true
if this first object equals the second; false
otherwise.Arrays.equals(long[], long[])
Copyright © 2014–2016 European Space Agency (ESA). All rights reserved.