|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.util.MapComparator
Comparator class for Maps. Gets array of keys which should be compared. Can get special comparators for each key also.
Field Summary | |
private boolean[] |
ascending
|
private java.lang.Object[] |
compkey
|
private java.util.Comparator[] |
elementcomparator
|
Constructor Summary | |
MapComparator()
Create a MapComparator with empty key list. |
|
MapComparator(java.util.List compkeyx)
|
|
MapComparator(java.lang.Object compkeyx)
Create a MapComparator with one key, default comparator and ascending sorting order. |
|
MapComparator(java.lang.Object[] compkeyx)
Create a MapComparator with multiple keys with decreasing relevance, generally ascending order and default comparators. |
|
MapComparator(java.lang.Object[] compkeyx,
boolean[] ascendingx)
|
|
MapComparator(java.lang.Object[] compkeyx,
boolean[] ascendingx,
java.util.Comparator[] elementcomparatorx)
|
|
MapComparator(java.lang.Object[] compkeyx,
java.util.Comparator[] elementcomparatorx)
|
|
MapComparator(java.lang.Object compkeyx,
boolean ascendingx)
Create a MapComparator with one key, given sorting order and standard comparator. |
|
MapComparator(java.lang.Object compkeyx,
boolean ascendingx,
java.util.Comparator elementcomparatorx)
Create a MapComparator with one key, arbitrary order and special comparator |
|
MapComparator(java.lang.Object compkeyx,
java.util.Comparator elementcomparatorx)
Create a MapComparator with one key, given comparator for the values and ascending sorting order. |
Method Summary | |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two maps by the given keys. |
boolean |
equals(java.lang.Object o)
|
void |
setCompareConstraints(java.util.List compkeyx)
|
void |
setCompareKey(java.lang.Object compkeyx)
|
void |
setCompareKey(java.lang.Object compkeyx,
boolean ascendingx)
|
void |
setCompareKey(java.lang.Object compkeyx,
boolean ascendingx,
java.util.Comparator elementcomparatorx)
|
void |
setCompareKey(java.lang.Object compkeyx,
java.util.Comparator elementcomparatorx)
|
void |
setCompareKeys(java.lang.Object[] compkeyx)
|
void |
setCompareKeys(java.lang.Object[] compkeyx,
boolean[] ascendingx)
|
void |
setCompareKeys(java.lang.Object[] compkeyx,
boolean[] ascendingx,
java.util.Comparator[] elementcomparatorx)
|
void |
setCompareKeys(java.lang.Object[] compkeyx,
java.util.Comparator[] elementcomparatorx)
|
void |
setElementComparator(java.util.Comparator elementcomparatorx)
|
void |
setElementComparators(java.util.Comparator[] elementcomparatorx)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.Object[] compkey
private boolean[] ascending
private java.util.Comparator[] elementcomparator
Constructor Detail |
public MapComparator()
public MapComparator(java.lang.Object compkeyx)
compkeyx
- Key for the values to compare the maps bypublic MapComparator(java.lang.Object compkeyx, boolean ascendingx)
compkeyx
- Key for the values to compare the maps byascendingx
- Flag to indicate ascending (true) or descending (false) sorting orderpublic MapComparator(java.lang.Object compkeyx, java.util.Comparator elementcomparatorx)
compkeyx
- Key for the values to compare the maps byelementcomparatorx
- Comparator for the valuespublic MapComparator(java.lang.Object compkeyx, boolean ascendingx, java.util.Comparator elementcomparatorx)
compkeyx
- Key for the values to compare the maps byascendingx
- Flag to indicate ascending (true) or descending (false) sorting orderelementcomparatorx
- Comparator for the valuespublic MapComparator(java.lang.Object[] compkeyx)
compkeyx
- Keys for the values to compare the maps by, each key is evaluated seperately on both maps.public MapComparator(java.lang.Object[] compkeyx, boolean[] ascendingx)
public MapComparator(java.lang.Object[] compkeyx, java.util.Comparator[] elementcomparatorx)
public MapComparator(java.lang.Object[] compkeyx, boolean[] ascendingx, java.util.Comparator[] elementcomparatorx)
public MapComparator(java.util.List compkeyx)
Method Detail |
public void setCompareKey(java.lang.Object compkeyx, boolean ascendingx, java.util.Comparator elementcomparatorx)
public void setCompareKey(java.lang.Object compkeyx, boolean ascendingx)
public void setCompareKey(java.lang.Object compkeyx, java.util.Comparator elementcomparatorx)
public void setCompareKey(java.lang.Object compkeyx)
public void setCompareKeys(java.lang.Object[] compkeyx, boolean[] ascendingx, java.util.Comparator[] elementcomparatorx)
public void setCompareKeys(java.lang.Object[] compkeyx, java.util.Comparator[] elementcomparatorx)
public void setCompareKeys(java.lang.Object[] compkeyx, boolean[] ascendingx)
public void setCompareKeys(java.lang.Object[] compkeyx)
public void setElementComparator(java.util.Comparator elementcomparatorx)
public void setElementComparators(java.util.Comparator[] elementcomparatorx)
public void setCompareConstraints(java.util.List compkeyx)
public int compare(java.lang.Object o1, java.lang.Object o2)
If the elements for this key are equal upon the first possible mentioned tests, the next key in the list is taken.
compare
in interface java.util.Comparator
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |