com.sssw.rt.expr
Class AgCompare
java.lang.Object
|
+--com.sssw.rt.expr.AgCompare
- public class AgCompare
- extends Object
A runtime helper class for calculating whether one String is greater than,
less than, or equal to another String.
Method Summary |
static int |
evaluate(String s1,
String s2)
Calculates whether one String is greater than, less than, or equal to another String. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AgCompare
public AgCompare()
evaluate
public static int evaluate(String s1,
String s2)
- Calculates whether one String is greater than, less than, or equal to another String.
- Parameters:
s1
- a String to be compared.s2
- a String to be compared.- Usage:
Returns a positive value if s1 is greater than s2, and returns
a negative value if s1 is less than s2. It returns 0 if the Strings
are equal or if either String is null.