Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.sort
Interface StringCollator

All Superinterfaces:
  java.io.Serializable

All Known Subinterfaces:
  SubstringMatcher

All Known Implementing Classes:
  AlphanumericCollator, CodepointCollator, LowercaseFirstCollator, NamedCollation, RuleBasedSubstringMatcher, UppercaseFirstCollator

    public interface StringCollator

extends java.io.Serializable

This interface represents a "collation" as defined in XPath, that is, a set of rules for comparing strings

Method Summary
`int` | `compareStrings(java.lang.String o1, java.lang.String o2)` Compare two strings
`java.lang.Object` | `getCollationKey(java.lang.String s)` Get a collation key for two Strings.

Method Detail

### compareStrings

    int compareStrings(java.lang.String o1,
                       java.lang.String o2)

  Compare two strings

  Parameters:
    `o1` - the first string
    `o2` - the second string
  Returns:
    0 if the strings are considered equal, a negative integer if the first string is less than the second, a positive integer if the first string is greater than the second

### getCollationKey

    java.lang.Object getCollationKey(java.lang.String s)

  Get a collation key for two Strings. The essential property of collation keys is that if two values are equal under the collation, then the collation keys are compare correctly under the equals() method.

  Parameters:
    `s` - the string whose collation key is required
  Returns:
    the collation key

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) Saxonica Limited. All rights reserved.