Class Pair<K,V>
java.lang.Object
org.apache.commons.math3.util.Pair<K,V>
- Type Parameters:
K- Key type.V- Value type.
- Direct Known Subclasses:
PointValuePair, PointValuePair, PointVectorValuePair, PointVectorValuePair
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> Pair <K, V> create(K k, V v) Convenience factory method that calls theconstructor.booleanCompare the specified object with this entry for equality.getFirst()Get the first element of the pair.getKey()Get the key.Get the second element of the pair.getValue()Get the value.inthashCode()Compute a hash code.toString()
-
Constructor Details
-
Pair
-
Pair
-
-
Method Details
-
getKey
-
getValue
-
getFirst
-
getSecond
-
equals
-
hashCode
-
toString
-
create
Convenience factory method that calls theconstructor.- Type Parameters:
K- the key typeV- the value type- Parameters:
k- First element of the pair.v- Second element of the pair.- Returns:
- a new
Paircontainingkandv. - Since:
- 3.3
-