|
Dashboard Builder Commons 6.0.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dashboard.commons.comparator.ComparatorUtils
public class ComparatorUtils
Helper class containing methods for the comparison between different types.
| Constructor Summary | |
|---|---|
ComparatorUtils()
|
|
| Method Summary | |
|---|---|
static int |
compare(Boolean o1,
Boolean o2,
int ordering)
Compares two booleans. |
static int |
compare(Collection o1,
Collection o2,
int ordering)
Compares two collections. |
static int |
compare(Comparable o1,
Comparable o2,
int ordering)
Compares two comparable objects. |
static int |
compare(Date o1,
Date o2,
int ordering)
Compares two dates. |
static int |
compare(Object obj,
Collection col,
int ordering)
Compare an element with the collection elements. |
static int |
compare(Object o1,
Object o2,
int ordering)
Compares two objects. |
static boolean |
equals(Collection o1,
Collection o2)
Check if tow collections contains exactly the same elements. |
static void |
main(String[] args)
Test compare methods. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComparatorUtils()
| Method Detail |
|---|
public static int compare(Comparable o1,
Comparable o2,
int ordering)
ordering: - 1=ascending, -1=descending
public static int compare(Date o1,
Date o2,
int ordering)
ordering: - 1=ascending, -1=descending
public static int compare(Boolean o1,
Boolean o2,
int ordering)
ordering: - 1=ascending, -1=descending
public static boolean equals(Collection o1,
Collection o2)
public static int compare(Collection o1,
Collection o2,
int ordering)
ordering: - 1=ascending, -1=descending
public static int compare(Object obj,
Collection col,
int ordering)
ordering: - 1=ascending, -1=descending
public static int compare(Object o1,
Object o2,
int ordering)
ordering: - 1=ascending, -1=descending
public static void main(String[] args)
throws Exception
Exception
|
Dashboard Builder Commons 6.0.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||