Class Pair<T,​V>

java.lang.Object
org.graffiti.util.Pair<T,​V>

public class Pair<T,​V>
extends Object
Encapsulates two values in a pair.
Version:
2.7.0
Author:
Paul, D. Garkov
Recent revisions:
2.7.0
  • Constructor Summary

    Constructors
    Constructor Description
    Pair​(T first, V second)
    Creates a new Pair object.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(Object obj)  
    T getFst()
    Returns the first (left) component of the pair.
    V getSnd()
    Returns the second (right) component of the pair.
    int hashCode()  
    String toString()  

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Pair

      public Pair​(T first, V second)
      Creates a new Pair object.
      Parameters:
      first - the first (left) component
      second - the second (right) component
  • Method Details

    • getFst

      public T getFst()
      Returns the first (left) component of the pair.
      Returns:
      the value of first component
    • getSnd

      public V getSnd()
      Returns the second (right) component of the pair.
      Returns:
      the value of second component
    • equals

      public boolean equals​(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object