public class Compare
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
compare(byte b1,
byte b2)
Compares two bytes.
|
static int |
compare(java.lang.Comparable o1,
java.lang.Comparable o2)
Compares two objects.
|
static int |
compare(java.util.Date d1,
java.util.Date d2)
Compares two dates.
|
static int |
compare(double d1,
double d2)
Compares two doubles.
|
static int |
compare(java.lang.Double d1,
java.lang.Double d2)
Compares two Doubles.
|
static int |
compare(java.lang.Integer n1,
java.lang.Integer n2)
Compares two Integers.
|
static int |
compare(int n1,
int n2)
Compares two ints.
|
static int |
compare(long n1,
long n2)
Compares two longs.
|
static int |
compare(java.lang.Long n1,
java.lang.Long n2)
Compares two Longs.
|
static int |
compare(java.lang.String s1,
java.lang.String s2)
Compares two case-sensitive strings.
|
static int |
compareIgnoreCase(java.lang.String s1,
java.lang.String s2)
Compares two case-insensitive strings.
|
static boolean |
equals(java.lang.Object o1,
java.lang.Object o2)
Returns true if two objects are equal.
|
static boolean |
equalsIgnoreCase(java.lang.String s1,
java.lang.String s2)
Returns true if two case-insensitive strings are equal.
|
public static boolean equalsIgnoreCase(java.lang.String s1,
java.lang.String s2)
Nulls are permitted and are equal only to themselves.
s1 - String 1.s2 - String 2.public static boolean equals(java.lang.Object o1,
java.lang.Object o2)
Nulls are permitted and are equal only to themselves.
o1 - Object 1.o2 - Object 2.public static int compare(java.lang.String s1,
java.lang.String s2)
Nulls are permitted and are less than non-nulls.
s1 - String 1.s2 - String 2.public static int compareIgnoreCase(java.lang.String s1,
java.lang.String s2)
Nulls are permitted and are less than non-nulls.
s1 - String 1.s2 - String 2.public static int compare(java.util.Date d1,
java.util.Date d2)
Nulls are permitted and are less than non-nulls.
d1 - Date 1.d2 - Date 2.public static int compare(int n1,
int n2)
n1 - Int 1.n2 - Int 2.public static int compare(long n1,
long n2)
n1 - Long 1.n2 - Long 2.public static int compare(double d1,
double d2)
d1 - double 1.d2 - double 2.public static int compare(java.lang.Integer n1,
java.lang.Integer n2)
Nulls are permitted and are less than non-nulls.
n1 - Integer 1.n2 - Integer 2.public static int compare(java.lang.Long n1,
java.lang.Long n2)
Nulls are permitted and are less than non-nulls.
n1 - Long 1.n2 - Long 2.public static int compare(java.lang.Double d1,
java.lang.Double d2)
Nulls are permitted and are less than non-nulls.
d1 - Double 1.d2 - Double 2.public static int compare(byte b1,
byte b2)
Nulls are permitted and are less than non-nulls.
b1 - byte 1.b2 - byte 2.public static int compare(java.lang.Comparable o1,
java.lang.Comparable o2)
Nulls are permitted and are less than non-nulls.
o1 - object 1.o2 - object 2.