Package io.github.cvc5
Class Pair<K,V>
java.lang.Object
io.github.cvc5.Pair<K,V>
- Type Parameters:
K- the type of the first elementV- the type of the second element
A simple generic container class to hold a pair of objects.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
first
The first element of the pair. -
second
The second element of the pair.
-
-
Constructor Details
-
Pair
Construct a new Pair with the given values.- Parameters:
first- the first element of the pairsecond- the second element of the pair
-
-
Method Details
-
equals
Compare this Pair to the specified object for equality. It returnstrueif the given object is also a Pair and both the first and second elements are equal. Elements are compared withObjects.equals(Object, Object), sonullelements are permitted and compare equal to each other. -
hashCode
public int hashCode()Return a hash code value for this pair. The hash code is derived from the hash codes of the first and second elements, so that pairs that are equal according toequals(Object)have the same hash code.
-