public class CompareUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> int |
compare(Comparable<T> c1,
T c2)
Compares two objects for relative order.
|
static boolean |
equals(byte[] o1,
byte[] o2)
Compares two byte arrays for equality.
|
static boolean |
equals(int[] o1,
int[] o2)
Compares two int arrays for equality.
|
static boolean |
equals(Object[] o1,
Object[] o2)
Compares two arrays of objects for equality.
|
static boolean |
equals(Object o1,
Object o2)
Compares two objects for equality.
|
public static boolean equals(Object o1, Object o2)
o1 - Objecto2 - Objectpublic static boolean equals(Object[] o1, Object[] o2)
o1 - Object arrayo2 - Object arraypublic static boolean equals(byte[] o1,
byte[] o2)
o1 - byte arrayo2 - byte arraypublic static boolean equals(int[] o1,
int[] o2)
o1 - int arrayo2 - int arraypublic static <T> int compare(Comparable<T> c1, T c2)
T - type of objects.c1 - Object that implements Comparablec2 - Objectc1 is less than, equal, or greater
than c2.