|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.sort.NamedCollation
public class NamedCollation
A StringCollator is used for comparing strings (Java String objects). The URI is retained along with the collation so that the collation can be reconstructed on demand, typically at run-time by compiled code which has access to the URI but not the collation object itself.
Constructor Summary | |
---|---|
NamedCollation(java.lang.String uri,
java.util.Comparator collation)
Create a NamedCollation |
Method Summary | |
---|---|
int |
compareStrings(java.lang.String o1,
java.lang.String o2)
Compares its two arguments for order. |
java.util.Comparator |
getCollation()
Get the underlying comparator |
java.lang.Object |
getCollationKey(java.lang.String s)
Get a collation key for two Strings. |
java.lang.String |
getUri()
Get the URI identifying the collation |
void |
setCollation(java.util.Comparator collation)
Set the underlying comparator |
void |
setUri(java.lang.String uri)
Set the URI identifying the collation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamedCollation(java.lang.String uri, java.util.Comparator collation)
uri
- the name of the collationcollation
- the Comparator that does the actual string comparisonMethod Detail |
---|
public int compareStrings(java.lang.String o1, java.lang.String o2)
compareStrings
in interface StringCollator
o1
- the first object to be compared.o2
- the second object to be compared.
java.lang.ClassCastException
- if the arguments' types prevent them from
being compared by this Comparator.public java.lang.String getUri()
public void setUri(java.lang.String uri)
uri
- the collation URIpublic java.util.Comparator getCollation()
public void setCollation(java.util.Comparator collation)
collation
- the underlying comparatorpublic java.lang.Object getCollationKey(java.lang.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 |