public final class Compare
extends java.lang.Object
Constructor and Description |
---|
Compare() |
Modifier and Type | Method and Description |
---|---|
static boolean |
areEqual(java.math.BigDecimal value1,
java.math.BigDecimal value2)
Return true if the two arguments are equal.
|
static boolean |
areEqual(boolean value1,
boolean value2)
Return true if the two arguments are equal.
|
static boolean |
areEqual(byte value1,
byte value2)
Return true if the two arguments are equal.
|
static boolean |
areEqual(char value1,
char value2)
Return true if the two arguments are equal.
|
static boolean |
areEqual(double value1,
double value2)
Return true if the two arguments are equal.
|
static boolean |
areEqual(float value1,
float value2)
Return true if the two arguments are equal.
|
static boolean |
areEqual(int value1,
int value2)
Return true if the two arguments are equal.
|
static boolean |
areEqual(long value1,
long value2)
Return true if the two arguments are equal.
|
static boolean |
areEqual(java.lang.Object value1,
java.lang.Object value2)
Return true if the two arguments are equal.
|
static boolean |
areEqual(short value1,
short value2)
Return true if the two arguments are equal.
|
static boolean |
areEqual(java.lang.String s1,
java.lang.String s2)
Return true if the two String arguments are equal,
where either or both of the arguments may be null.
|
public static boolean areEqual(boolean value1, boolean value2)
value1
- The value to compare.value2
- The value to compare against.public static boolean areEqual(int value1, int value2)
value1
- The value to compare.value2
- The value to compare against.public static boolean areEqual(long value1, long value2)
value1
- The value to compare.value2
- The value to compare against.public static boolean areEqual(char value1, char value2)
value1
- The value to compare.value2
- The value to compare against.public static boolean areEqual(byte value1, byte value2)
value1
- The value to compare.value2
- The value to compare against.public static boolean areEqual(short value1, short value2)
value1
- The value to compare.value2
- The value to compare against.public static boolean areEqual(float value1, float value2)
value1
- The value to compare.value2
- The value to compare against.public static boolean areEqual(double value1, double value2)
value1
- The value to compare.value2
- The value to compare against.public static boolean areEqual(java.lang.Object value1, java.lang.Object value2)
Generic Object compare. If both are null returns true, else both must be of same class and value1.equals (value2) must return true.
value1
- The value to compare.value2
- The value to compare against.public static boolean areEqual(java.lang.String s1, java.lang.String s2)
s1
- The first of the two Strings.s2
- The second of the two Strings.public static boolean areEqual(java.math.BigDecimal value1, java.math.BigDecimal value2)
Compare BigDecimal values using compareTo to ignore differences in scale.
value1
- The value to compare.value2
- The value to compare against.Copyright ? 2002 Clarity Systems Group, LLC. All Rights Reserved.