S
- Key class.T
- Value class.StringValuePair
public class KeyValuePair<S,T> extends Object
Modifier and Type | Field | Description |
---|---|---|
protected S |
key |
Pair key.
|
protected Map<String,Object> |
propMap |
Property map.
|
protected T |
value |
Pair value.
|
Constructor | Description |
---|---|
KeyValuePair(S key,
T value) |
Creates a new pair.
|
Modifier and Type | Method | Description |
---|---|---|
Object |
get(String propKey) |
Returns the property attached to the specified key.
|
S |
getKey() |
Returns the pair key.
|
Map<String,Object> |
getProps() |
Returns all attached properties.
|
T |
getValue() |
Returns the pair value.
|
void |
set(String propKey,
Object propValue) |
Sets the property specified by the key and value.
|
public T getValue()
public S getKey()
public Object get(String propKey)
propKey
- Property key.public void set(String propKey, Object propValue)
propKey
- Property key.propValue
- Property value.