Configuration Platform SDK 7.6 API Reference

com.genesyslab.platform.commons.collections
Class KeyValuePair

java.lang.Object
  extended bycom.genesyslab.platform.commons.collections.Pair
      extended bycom.genesyslab.platform.commons.collections.KeyValuePair
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class KeyValuePair
extends Pair

The pair specific for KeyValueCollection. Please see {com.genesyslab.platform.commons.collections.KeyValueCollection TKVList} documentation for the list of supported value types. TKVList supports pairs with string keys only. Neither key nor value is allowed to be null.

See Also:
Serialized Form

Constructor Summary
KeyValuePair(java.lang.String key)
          Create empty Pair.
KeyValuePair(java.lang.String key, byte[] value)
          Create Pair with binary data.
KeyValuePair(java.lang.String key, int value)
          Create Pair with integer data.
KeyValuePair(java.lang.String key, KeyValueCollection value)
          Create Pair with TKV data.
KeyValuePair(java.lang.String key, java.lang.String value)
          Create Pair with string data.
KeyValuePair(java.lang.String key, java.lang.String value, boolean isWideString)
          Create Pair with string (possibly unicode) data.
 
Method Summary
 KeyValueCollection getTKVValue()
          Return TKVList value of the Pair or null if the value is not TKVList.
 void setTKVValue(KeyValueCollection val)
          Set value of this Pair to TKVList
 
Methods inherited from class com.genesyslab.platform.commons.collections.Pair
equals, getBinaryValue, getIntValue, getStringKey, getStringValue, getValue, getValueType, hashCode, setBinaryValue, setIntValue, setIntValue, setStringValue, setUTF16Value, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyValuePair

public KeyValuePair(java.lang.String key)
Create empty Pair.

Parameters:
key - Key for the Pair
Throws:
java.lang.NullPointerException - if key is null

KeyValuePair

public KeyValuePair(java.lang.String key,
                    byte[] value)
Create Pair with binary data.

Parameters:
key - Key for the Pair
value - Value of the Pair
Throws:
java.lang.NullPointerException - if either key or value is null

KeyValuePair

public KeyValuePair(java.lang.String key,
                    int value)
Create Pair with integer data.

Parameters:
key - Key for the Pair
value - Value of the Pair
Throws:
java.lang.NullPointerException - if either key or value is null

KeyValuePair

public KeyValuePair(java.lang.String key,
                    java.lang.String value)
Create Pair with string data.

Parameters:
key - Key for the Pair
value - Value of the Pair
Throws:
java.lang.NullPointerException - if either key or value is null

KeyValuePair

public KeyValuePair(java.lang.String key,
                    java.lang.String value,
                    boolean isWideString)
Create Pair with string (possibly unicode) data.

Parameters:
key - Key for the Pair
value - Value of the Pair
isWideString - true - if string should be serialized in unicode, false - if in single-byte encoding
Throws:
java.lang.NullPointerException - if either key or value is null

KeyValuePair

public KeyValuePair(java.lang.String key,
                    KeyValueCollection value)
Create Pair with TKV data.

Parameters:
key - Key for the Pair
value - Value of the Pair
Throws:
java.lang.NullPointerException - if either key or value is null
Method Detail

getTKVValue

public KeyValueCollection getTKVValue()
Return TKVList value of the Pair or null if the value is not TKVList.

Returns:
TKVList or null

setTKVValue

public void setTKVValue(KeyValueCollection val)
Set value of this Pair to TKVList

Parameters:
val - new value (TKVList)
Throws:
java.lang.NullPointerException - if val is null

Configuration Platform SDK 7.6 API Reference

Send comments on this topic.
Copyright © 2006–2008 Genesys Telecommunication Laboratories, Inc. All rights reserved.