java.io.Serializable
, java.lang.Cloneable
KeyValuePair
public abstract class Pair
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.Object |
key |
Key of the Pair
|
protected java.lang.Object |
value |
Value of the pair
|
Constructor | Description |
---|---|
Pair() |
Modifier and Type | Method | Description |
---|---|---|
protected java.lang.Object |
clone() |
|
boolean |
equals(java.lang.Object obj) |
|
byte[] |
getBinaryValue() |
Returns binary value of the Pair or null if the value is not a binary data.
|
java.lang.Integer |
getIntValue() |
Returns integer value.
|
java.lang.String |
getStringKey() |
Returns the key as a string.
|
java.lang.String |
getStringValue() |
Returns string value of the Pair or null if the value is not a string.
|
java.lang.Object |
getValue() |
|
java.lang.String |
getValueAsString() |
Returns string representation of a scalar value stored in this KV pair.
|
ValueType |
getValueType() |
Returns the type of value that is stored in this
Pair . |
int |
hashCode() |
|
void |
setBinaryValue(byte[] data) |
Sets value of this Pair to some binary data
|
void |
setIntValue(int i) |
Sets value of this Pair to an integer.
|
void |
setIntValue(java.lang.Integer i) |
Sets value of this Pair to an integer.
|
void |
setStringValue(java.lang.String val) |
Sets value of this Pair to a string.
|
void |
setUTF16Value(UTFValue val) |
Sets value of this Pair to UTF-16 String.
|
void |
setUTF16Value(java.lang.String val) |
Sets value of this Pair to UTF-16 String.
|
protected void |
setValue(java.lang.Object val) |
|
java.lang.String |
toString() |
protected java.lang.Object key
protected java.lang.Object value
public java.lang.String getStringKey()
public java.lang.Integer getIntValue()
public void setIntValue(int i)
i
- new value (integer)public void setIntValue(java.lang.Integer i)
i
- new value (integer)public byte[] getBinaryValue()
public java.lang.Object getValue()
public void setBinaryValue(byte[] data)
data
- new value (binary data)java.lang.NullPointerException
- if data is nullpublic java.lang.String getStringValue()
public void setStringValue(java.lang.String val)
val
- new value (String)java.lang.NullPointerException
- if val is nullpublic void setUTF16Value(java.lang.String val)
getStringValue()
method.getValue()
returns special string wrapper instance (UTFValue
).getValueType()
will return ValueType.WIDE_STRING
.setStringValue(String)
.val
- string valuejava.lang.NullPointerException
- if val is nullUTFValue
public void setUTF16Value(UTFValue val)
getStringValue()
method.getValue()
returns special string wrapper instance (UTFValue
).getValueType()
will return ValueType.WIDE_STRING
.setStringValue(String)
.val
- UTF-string valuejava.lang.NullPointerException
- if val is nullUTFValue
public ValueType getValueType()
Pair
.
For supported types please consult documentation of the List you use.Pair
.public java.lang.String getValueAsString()
null
is returned.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
protected void setValue(java.lang.Object val)
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.