Package org.pgcodekeeper.core.utils
Class ModPair<K,V>
java.lang.Object
org.pgcodekeeper.core.utils.Pair<K,V>
org.pgcodekeeper.core.utils.ModPair<K,V>
- Type Parameters:
K- type of the first elementV- type of the second element
- All Implemented Interfaces:
Serializable
Modifiable pair class extending the immutable Pair class.
Provides setter methods to modify the first and second elements after construction.
- See Also:
-
Constructor Details
-
ModPair
Creates a new modifiable pair with specified elements.- Parameters:
first- the first elementsecond- the second element
-
-
Method Details
-
setFirst
Sets the first element of this pair.- Parameters:
first- the new first element
-
setSecond
Sets the second element of this pair and returns the previous value.- Parameters:
second- the new second element- Returns:
- the previous second element
-