Oracle® Globalization Development Kit Java API Reference
10g Release 1(10.1)

B10971-01

oracle.i18n.text
Class OraCollationKey

java.lang.Object
  |
  +--oracle.i18n.text.OraCollationKey
All Implemented Interfaces:
Comparable

public class OraCollationKey
extends Object
implements Comparable

OraCollationKey class represents a String under control of a specific OraCollator object. This construct is used to store a sorting order under a certain sorting rule and to be compared when needed.

Since:
Oracle 10.1.0.2
See Also:
OraCollator

Method Summary
 int compareTo(Object o)
          Compares this OraCollationKey with the specified Object.
 int compareTo(oracle.i18n.text.OraCollationKey target)
          Compare this OraCollationKey to the target OraCollationKey.
 boolean equals(Object target)
          Determines if this OraCollationKey and the target OraCollationKey are equal.
 String getSourceString()
          Returns the source String that this OraCollationKey represents.
 int hashCode()
          Creates a hashCode for this OraCollationKey; the value is calculated on the key, not the source String.
 byte[] toByteArray()
          Converts the OraCollationKey to a sequence of bytes.

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

compareTo

public int compareTo(oracle.i18n.text.OraCollationKey target)
Compare this OraCollationKey to the target OraCollationKey. The collation rules of the OraCollator object that created these keys are applied. OraCollationKeys created by different OraCollators cannot be compared.
Parameters:
target - the target OraCollationKey
Returns:
OraCollator.GREATER, OraCollator.LESS or OraCollator.EQUAL
See Also:
OraCollator.compare(java.lang.Object, java.lang.Object)

compareTo

public int compareTo(Object o)
Compares this OraCollationKey with the specified Object.
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to which the OraCollationKey is compared
Returns:
OraCollator.GREATER, OraCollator.LESS or OraCollator.EQUAL
Throws:
ClassCastException - the specified object is not a OraCollationKey

equals

public boolean equals(Object target)
Determines if this OraCollationKey and the target OraCollationKey are equal.
Overrides:
equals in class Object
Parameters:
target - the OraCollationKey to which this OraCollationKey is compared
Returns:
TRUE if the two are equal; FALSE otherwise

hashCode

public int hashCode()
Creates a hashCode for this OraCollationKey; the value is calculated on the key, not the source String.
Overrides:
hashCode in class Object
Returns:
he hashValue

getSourceString

public String getSourceString()
Returns the source String that this OraCollationKey represents.
Returns:
the source String

toByteArray

public byte[] toByteArray()
Converts the OraCollationKey to a sequence of bytes.
Returns:
a byte array representation of the OraCollationKey

Oracle® Globalization Development Kit Java API Reference
10g Release 1(10.1)

B10971-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.