Class Pair<K,V>

java.lang.Object
io.github.cvc5.Pair<K,V>
Type Parameters:
K - the type of the first element
V - the type of the second element

public class Pair<K,V> extends Object
A simple generic container class to hold a pair of objects.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The first element of the pair.
    The second element of the pair.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pair(K first, V second)
    Construct a new Pair with the given values.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object pair)
    Compare this Pair to the specified object for equality.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • first

      public K first
      The first element of the pair.
    • second

      public V second
      The second element of the pair.
  • Constructor Details

    • Pair

      public Pair(K first, V second)
      Construct a new Pair with the given values.
      Parameters:
      first - the first element of the pair
      second - the second element of the pair
  • Method Details

    • equals

      public boolean equals(Object pair)
      Compare this Pair to the specified object for equality. It returns true if the given object is also a Pair and both the first and second elements are equal (using their equals method).
      Overrides:
      equals in class Object
      Parameters:
      pair - the object to compare with this pair
      Returns:
      true if the specified object is equal to this pair, false otherwise