public class StringPair
extends java.lang.Object
implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The IBM copyright notice field.
|
Constructor and Description |
---|
StringPair(java.lang.String k,
java.lang.String v)
This constructor takes in a key or value pair.
|
StringPair(java.lang.String k,
java.lang.String v,
java.text.Collator c)
Deprecated.
This constructor is replaced by StringPair(java.lang.String,java.lang.String,com.ibm.icu.text.Collator)
for the same purpose.
This constructor takes in a key or value pair and a collator.
|
StringPair(java.lang.String k,
java.lang.String v,
com.ibm.icu.text.Collator c)
This constructor takes in a key or value pair and a collator.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Compares with another StringPair's value.
|
java.text.Collator |
getCollator()
Deprecated.
This method is replaced by method getICUCollator() for the same purpose.
Gets the collator
|
com.ibm.icu.text.Collator |
getICUCollator()
Gets the collator
|
java.lang.String |
getKey()
Returns the key.
|
java.lang.String |
getValue()
Returns the value.
|
void |
setCollator(java.text.Collator c)
Deprecated.
This method is replaced by method setICUCollator(com.ibm.icu.text.Collator) for the same purpose.
Sets the collator
|
void |
setICUCollator(com.ibm.icu.text.Collator c)
Sets the collator
|
void |
setKey(java.lang.String k)
Sets the key.
|
void |
setValue(java.lang.String v)
Sets the value.
|
public static final java.lang.String COPYRIGHT
public StringPair(java.lang.String k, java.lang.String v)
k
- the keyv
- the valuepublic StringPair(java.lang.String k, java.lang.String v, java.text.Collator c)
k
- the keyv
- the valuec
- the collatorpublic StringPair(java.lang.String k, java.lang.String v, com.ibm.icu.text.Collator c)
k
- the keyv
- the valuec
- the collatorpublic java.lang.String getKey()
public void setKey(java.lang.String k)
k
- the keypublic java.lang.String getValue()
public void setValue(java.lang.String v)
v
- the valuepublic int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- StringPair
object to be compared0
if the objects are equal, or an exception is thrown-1
if this value is less than the object's value1
if this value is greater than the object's valuepublic java.text.Collator getCollator()
public com.ibm.icu.text.Collator getICUCollator()
public void setCollator(java.text.Collator c)
c
- the collatorpublic void setICUCollator(com.ibm.icu.text.Collator c)
c
- the collator