Package oracle.i18n.text
Class OraCollationKey
- java.lang.Object
-
- oracle.i18n.text.OraCollationKey
-
- All Implemented Interfaces:
Comparable
public class OraCollationKey extends Object implements Comparable
TheOraCollationKey
class represents aString
object under control of a specificOraCollator
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object o)
Compares thisOraCollationKey
object with the specifiedObject
object.int
compareTo(OraCollationKey target)
Compare thisOraCollationKey
object to the targetOraCollationKey
object.boolean
equals(Object target)
Determines if thisOraCollationKey
object and the targetOraCollationKey
object are equal.int
getNextMonoKeys(byte[] keyArray)
int[]
getNextMultiKeys(byte[] keyArray)
String
getSourceString()
Returns the sourceString
object that thisOraCollationKey
object represents.int
hashCode()
Creates a hash code for thisOraCollationKey
object; the value is calculated on the key, not the source string.byte[]
toByteArray()
Converts theOraCollationKey
object to a sequence of bytes.
-
-
-
Method Detail
-
compareTo
public int compareTo(OraCollationKey target)
Compare thisOraCollationKey
object to the targetOraCollationKey
object. The collation rules of theOraCollator
object that created these keys are applied.OraCollationKey
objects created by differentOraCollator
objects cannot be compared.- Parameters:
target
- the targetOraCollationKey
- Returns:
OraCollator.GREATER
,OraCollator.LESS
, orOraCollator.EQUAL
- See Also:
OraCollator.compare(java.lang.Object, java.lang.Object)
-
compareTo
public int compareTo(Object o)
Compares thisOraCollationKey
object with the specifiedObject
object.- Specified by:
compareTo
in interfaceComparable
- Parameters:
o
- theObject
object to which theOraCollationKey
object is compared- Returns:
OraCollator.GREATER
,OraCollator.LESS
, orOraCollator.EQUAL
-
equals
public boolean equals(Object target)
Determines if thisOraCollationKey
object and the targetOraCollationKey
object are equal.
-
hashCode
public int hashCode()
Creates a hash code for thisOraCollationKey
object; the value is calculated on the key, not the source string.
-
getSourceString
public String getSourceString()
Returns the sourceString
object that thisOraCollationKey
object represents.- Returns:
- the source
String
object
-
toByteArray
public byte[] toByteArray()
Converts theOraCollationKey
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)
-
-