Class Pair<T1,​T2>

java.lang.Object
net.andreinc.mockneat.types.Pair<T1,​T2>
Type Parameters:
T1 - The type of the first member
T2 - The type of the second member

public class Pair<T1,​T2>
extends java.lang.Object
A simple Pair (or Tuple implementation).
  • Constructor Summary

    Constructors 
    Constructor Description
    Pair​(T1 first, T2 second)  
  • Method Summary

    Modifier and Type Method Description
    T1 getFirst()  
    T2 getSecond()  
    static <T1,​ T2> Pair<T1,​T2> of​(T1 first, T2 second)  

    Methods inherited from class java.lang.Object

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

    • Pair

      public Pair​(T1 first, T2 second)
  • Method Details

    • of

      public static <T1,​ T2> Pair<T1,​T2> of​(T1 first, T2 second)
    • getFirst

      public T1 getFirst()
      Returns:
      the first member of the Pair<T1, T2>.
    • getSecond

      public T2 getSecond()
      Returns:
      the second member fo the Pair<T1, T2>