Package de.espirit.common.util
Class Pair<K,V>
java.lang.Object
de.espirit.common.util.Pair<K,V>
- All Implemented Interfaces:
Serializable
,Map.Entry<K,
V>
Container for a pair of objects, usually a key and a value.
- Since:
- 4.2.34
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> Pair<K, V> create
(K key, V value) Create a pair with the givenkey
andvalue
.getKey()
The key of the pair.getValue()
Returns the value corresponding to this pair.void
Set the key of the pair,null
keys are allowed.Set the value of the pair,null
values are allowed.
-
Constructor Details
-
Pair
Use the factory methodcreate(Object, Object)
.- Since:
- 4.2.34
-
-
Method Details
-
create
Create a pair with the givenkey
andvalue
. -
getKey
The key of the pair. -
setKey
Set the key of the pair,null
keys are allowed.- Since:
- 4.2.34
-
getValue
Returns the value corresponding to this pair. The value may benull
. -
setValue
Set the value of the pair,null
values are allowed.
-