|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.expr.sort.AlphanumericCollator
public class AlphanumericCollator
A Comparer that treats strings as an alternating sequence of alpha parts and numeric parts. The alpha parts are compared using a base collation supplied as a parameter; the numeric parts are compared numerically. "Numeric" here means a sequence of consecutive ASCII digits 0-9.
Note: this StringCollator produces an ordering that is not compatible with equals().
| Constructor Summary | |
|---|---|
AlphanumericCollator(StringCollator base)
Create an alphanumeric collation |
|
| Method Summary | |
|---|---|
boolean |
comparesEqual(String s1,
String s2)
Compare two strings for equality. |
int |
compareStrings(String s1,
String s2)
Compare two objects. |
Object |
getCollationKey(String s)
Get a collation key for two Strings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AlphanumericCollator(StringCollator base)
base - the collation used to compare the alphabetic parts of the string| Method Detail |
|---|
public int compareStrings(String s1,
String s2)
compareStrings in interface StringCollators1 - the first strings2 - the second string
public boolean comparesEqual(String s1,
String s2)
comparesEqual in interface StringCollators1 - the first strings2 - the second string
public Object getCollationKey(String s)
getCollationKey in interface StringCollators - the string whose collation key is required
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||