nl.knowledgeplaza.util
Class AbstractComparator
java.lang.Object
nl.knowledgeplaza.util.AbstractComparator
- All Implemented Interfaces:
- java.util.Comparator
public class AbstractComparator
- extends java.lang.Object
- implements java.util.Comparator
This class does the basic comparing for you:
- is either class NULL
- are the classes identical
Usage:
public int compare(Object o1, Object o2)
{
int lComparator = super.compare(o1, o2);
if (lComparator != UNDETERMINED) return lComparator;
...
}
|
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
This is the actual compare |
static int |
compare2(java.lang.Object o1,
java.lang.Object o2)
This is for convenience |
| 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 |
GREATER
public static int GREATER
EQUAL
public static int EQUAL
LESS
public static int LESS
UNDETERMINED
public static int UNDETERMINED
AbstractComparator
public AbstractComparator()
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- This is the actual compare
- Specified by:
compare in interface java.util.Comparator
- Parameters:
o1 - o2 -
- Returns:
compare2
public static int compare2(java.lang.Object o1,
java.lang.Object o2)
- This is for convenience
- Parameters:
o1 - o2 -
- Returns:
Copyright © 2010 KnowledgePlaza. All Rights Reserved.