Skip navigation links

Oracle® Database Globalization Development Kit Java API Reference
11g Release 1 (11.1)

Book Part Number B28299-01


oracle.i18n.text
Class OraCollationKey

java.lang.Object
  extended by oracle.i18n.text.OraCollationKey

All Implemented Interfaces:
Comparable

public class OraCollationKey
extends Object
implements Comparable

The OraCollationKey class represents a String object 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

Field Summary
protected  int primIdx
           
protected  int secIdx
           
protected  int terIdx
           

 

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

 

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

 

Field Detail

primIdx

protected int primIdx

secIdx

protected int secIdx

terIdx

protected int terIdx

Method Detail

compareTo

public int compareTo(OraCollationKey target)
Compare this OraCollationKey object to the target OraCollationKey object. The collation rules of the OraCollator object that created these keys are applied. OraCollationKey objects created by different OraCollator objects 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 object with the specified Object object.
Specified by:
compareTo in interface Comparable
Parameters:
o - the Object object to which the OraCollationKey object is compared
Returns:
OraCollator.GREATER, OraCollator.LESS, or OraCollator.EQUAL

equals

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

hashCode

public int hashCode()
Creates a hash code for this OraCollationKey object; the value is calculated on the key, not the source string.
Overrides:
hashCode in class Object
Returns:
the hash value

getSourceString

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

toByteArray

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

getNextMultiKeys

public int[] getNextMultiKeys(byte[] keyArray)

getNextMonoKeys

public int getNextMonoKeys(byte[] keyArray)

Skip navigation links

Oracle® Database Globalization Development Kit Java API Reference
11g Release 1 (11.1)

Book Part Number B28299-01


Copyright © 2003, 2007, Oracle. All rights reserved.