|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.sort.SimpleCollation
public class SimpleCollation
A simple collation that just wraps a suppled Comparator
Constructor Summary | |
---|---|
SimpleCollation(Comparator collation)
Create a SimpleCollation |
Method Summary | |
---|---|
boolean |
comparesEqual(String s1,
String s2)
Compare two strings for equality. |
int |
compareStrings(String o1,
String o2)
Compares its two arguments for order. |
Comparator |
getCollation()
Get the underlying comparator |
Object |
getCollationKey(String s)
Get a collation key for two Strings. |
void |
setCollation(Comparator collation)
Set the underlying comparator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleCollation(Comparator collation)
collation
- the Comparator that does the actual string comparisonMethod Detail |
---|
public int compareStrings(String o1, String o2)
compareStrings
in interface StringCollator
o1
- the first object to be compared.o2
- the second object to be compared.
ClassCastException
- if the arguments' types prevent them from
being compared by this Comparator.public boolean comparesEqual(String s1, String s2)
comparesEqual
in interface StringCollator
s1
- the first strings2
- the second string
public Comparator getCollation()
public void setCollation(Comparator collation)
collation
- the underlying comparatorpublic Object getCollationKey(String s)
getCollationKey
in interface StringCollator
s
- the string whose collation key is required
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |