net.sf.webmancer.util
Class EqualsUtil
java.lang.Object
net.sf.webmancer.util.EqualsUtil
public class EqualsUtil
- extends java.lang.Object
- Author:
- Michal Burda
- See Also:
Arrays
Method Summary |
static boolean |
areEqual(boolean first,
boolean second)
|
static boolean |
areEqual(double first,
double second)
|
static boolean |
areEqual(float first,
float second)
|
static boolean |
areEqual(char first,
char second)
|
static boolean |
areEqual(long first,
long second)
|
static boolean |
areEqual(java.lang.Object o1,
java.lang.Object o2)
This method implements a null value safe comparison of two objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
areEqual
public static boolean areEqual(boolean first,
boolean second)
- Parameters:
first
- second
-
- Returns:
areEqual
public static boolean areEqual(char first,
char second)
- Parameters:
first
- second
-
- Returns:
areEqual
public static boolean areEqual(long first,
long second)
- Parameters:
first
- second
-
- Returns:
areEqual
public static boolean areEqual(float first,
float second)
- Parameters:
first
- second
-
- Returns:
areEqual
public static boolean areEqual(double first,
double second)
- Parameters:
first
- second
-
- Returns:
areEqual
public static boolean areEqual(java.lang.Object o1,
java.lang.Object o2)
- This method implements a
null
value safe comparison of two objects. If the two given parameters
are both null
, the method returns true
. If either parameter is null
while the other is not null
, the method returns false
. In the other case, a first
parameter's Object.equals(Object)
method is called and the result is returned.
- Parameters:
o1
- First object to be compared or null
o2
- Second object to be compared or null
- Returns:
true
iff both parameters are null
or they equal accordingly to
Object.equals(Object)
Copyright © 2006-2007. All Rights Reserved.