|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openadaptor.util.comparator.IntegerComparator
public class IntegerComparator
For JDK 1.1 compatibility, we need to provide our own Integer comparator to avoid a ClassCastException when using collections for JDK 1.1.
This is because java.lang.String implements java.util.Comparable but Collections for JDK 1.1 is expecting an object which implements com.sun.java.util.collections.Comparable.
Constructor Summary | |
---|---|
IntegerComparator()
|
Method Summary | |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Provide the essential implementation of compare() method. |
boolean |
equals(java.lang.Object obj)
Provide implementation of equals. |
static IntegerComparator |
getInstance()
Provide access to a IntegerComparator instance |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntegerComparator()
Method Detail |
---|
public static IntegerComparator getInstance()
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
public boolean equals(java.lang.Object obj)
This method is not actually used in our context.
equals
in interface java.util.Comparator
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |