|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.collections.Pair
public abstract class Pair
This class represents the pair in key-value list. You will rarely need to create the Pair explicitly. Use appropriate add method of the list.
Field Summary | |
---|---|
protected java.lang.Object |
key
Key of the Pair |
protected java.lang.Object |
value
Value of the pair |
Constructor Summary | |
---|---|
Pair()
|
Method Summary | |
---|---|
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()
|
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(java.lang.String val)
Sets value of this Pair to UTF-16 String. |
void |
setUTF16Value(UTFValue val)
Sets value of this Pair to UTF-16 String. |
protected void |
setValue(java.lang.Object val)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.Object key
protected java.lang.Object value
Constructor Detail |
---|
public Pair()
Method Detail |
---|
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 value
java.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 value
java.lang.NullPointerException
- if val is nullUTFValue
public ValueType getValueType()
Pair
.
For supported types please consult documentation of the List you use.
Pair
.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)
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |