org.sape.carboncontrib.utils
Class CompareHelper
java.lang.Object
org.sape.carboncontrib.utils.CompareHelper
- public final class CompareHelper
- extends Object
Helper class for comparing objects.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompareHelper
public CompareHelper()
compare
public static int compare(Comparable obj1,
Comparable obj2)
- Compares the supplied objects.
- Returns:
- int - the compared value of the two objects
- 0 if they are the same
- -1 if obj1 is null or obj1 is less than obj2
- 1 if obj2 is null or obj1 is greater than obj2
Copyright 2003 Sapient Corporation. All Rights Reserved.