S
- Key class.T
- Value class.StringValuePair
public class KeyValuePair<S,T>
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
protected S |
key |
Pair key.
|
protected java.util.Map<java.lang.String,java.lang.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 |
---|---|---|
java.lang.Object |
get(java.lang.String propKey) |
Returns the property attached to the specified key.
|
S |
getKey() |
Returns the pair key.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProps() |
Returns all attached properties.
|
T |
getValue() |
Returns the pair value.
|
void |
set(java.lang.String propKey,
java.lang.Object propValue) |
Sets the property specified by the key and value.
|
protected S key
protected T value
protected java.util.Map<java.lang.String,java.lang.Object> propMap
public T getValue()
public S getKey()
public java.lang.Object get(java.lang.String propKey)
propKey
- Property key.public void set(java.lang.String propKey, java.lang.Object propValue)
propKey
- Property key.propValue
- Property value.public java.util.Map<java.lang.String,java.lang.Object> getProps()