Class AbstractPair<T,​U>

Object
AbstractPair<T,​U>
Direct Known Subclasses:
AbstractMutablePair, Pair

public abstract class AbstractPair<T,​U>
extends Object
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractPair()  
  • Method Summary

    Modifier and Type Method Description
    abstract T getFirst()
    Returns the value of the first item in the pair
    abstract U getSecond()
    Returns the value of the second item in the pair
    String toString()
    Returns the toString of the pair in the form <first, second>

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getFirst

      public abstract T getFirst()
      Returns the value of the first item in the pair
      Returns:
      the value of the first item in the pair
    • getSecond

      public abstract U getSecond()
      Returns the value of the second item in the pair
      Returns:
      the value of the second item in the pair
    • toString

      public String toString()
      Returns the toString of the pair in the form <first, second>
      Overrides:
      toString in class Object
      Returns:
      the toString as specified