Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.collections
Class KeyValuePair

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

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

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

Constructor Detail

KeyValuePair

public KeyValuePair(java.lang.String key)
Creates 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)
Creates 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)
Creates 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)
Creates 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)
Creates 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)
Creates 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()
Returns TKVList value of the Pair or null if the value is not TKVList.

Returns:
TKVList or null

setTKVValue

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

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

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.