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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> Pair<K, V> create(K key, V value) Create a pair with the givenkeyandvalue.getKey()The key of the pair.getValue()Returns the value corresponding to this pair.voidSet the key of the pair,nullkeys are allowed.Set the value of the pair,nullvalues are allowed.
-
Constructor Details
-
Pair
Use the factory methodcreate(Object, Object).- Since:
- 4.2.34
-
-
Method Details
-
create
Create a pair with the givenkeyandvalue. -
getKey
The key of the pair. -
setKey
Set the key of the pair,nullkeys 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,nullvalues are allowed.
-