public class Objects
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.Double |
ZERO_DOUBLE
The zero double.
|
Constructor and Description |
---|
Objects() |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(java.lang.Object a,
java.lang.Object b)
Tests whether two objects are equals.
|
public static final boolean equals(java.lang.Object a, java.lang.Object b)
It takes care of the null case. Thus, it is helpful to implement Object.equals.
Notice: it uses compareTo if BigDecimal is found. So, in this case, a.equals(b) might not be the same as Objects.equals(a, b).
If both a and b are Object[], they are compared item-by-item.
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.