KeyValuePair< K, V > class
A simple key-value pair helper class.
Package
com.sybase365.mobiliser.brand.plugins.useful
Syntax
Syntax
public class KeyValuePair< K, V >
Members
All members of KeyValuePair< K, V >, including inherited members.
MethodsModifier and Type | Method | Description |
---|---|---|
public K | getKey() | Retrieves the key. |
public V | getValue() | Retrieves the value. |
public | KeyValuePair() | |
public | KeyValuePair(K, V) | |
public void | setKey(K) | Overwrites the actual key with the specified one. |
public void | setValue(V) | Overwrites the actual value with the specified one. |
public String | toString() |
Usage
Commonly used in creating a selection java.util.List for the SelectionBoxAttribute. For example, private static final SelectionBoxAttribute inIncludeInActive = new SelectionBoxAttribute("ACTIVE_ID","Include In-Active [Default: false]", true); static { inIncludeInActive.getItems().add(new KeyValuePair<String, String>("true", "True")); inIncludeInActive.getItems().add(new KeyValuePair<String, String>("false", "False")); }