|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.comparator.NumberComparator
public class NumberComparator
Comparator for Number type. This is a singleton class. Call getInstance() to get the comparator.
| Field Summary | |
|---|---|
static ComparatorContext |
CONTEXT_ABSOLUTE
Comparator Context to compare two values using the absolute value. |
| Constructor Summary | |
|---|---|
protected |
NumberComparator()
Constructor. |
| Method Summary | |
|---|---|
int |
compare(Object o1,
Object o2)
Compares two Numbers. |
static NumberComparator |
getInstance()
Returns NumberComparator singleton. |
boolean |
isAbsolute()
Checks if if the values are compared using the absolute values. |
void |
setAbsolute(boolean absolute)
Sets the flag to compare the values using the absolute value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Field Detail |
|---|
public static final ComparatorContext CONTEXT_ABSOLUTE
| Constructor Detail |
|---|
protected NumberComparator()
| Method Detail |
|---|
public static NumberComparator getInstance()
public int compare(Object o1,
Object o2)
compare in interface Comparator<Object>o1 - the first object to be comparedo2 - the second object to be compared
public boolean isAbsolute()
public void setAbsolute(boolean absolute)
absolute - true or false.
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||