Class Pair<T,E>

java.lang.Object
com.jackmeng.locale.Pair<T,E>
Direct Known Subclasses:
Trio

public class Pair<T,E> extends Object
This class dedicates a Map style data structure, however it is not a list-like data structure.
Since:
3.0
Author:
Jack Meng
  • Field Details

    • first

      public T first
    • second

      public E second
  • Constructor Details

    • Pair

      public Pair(T first, E second)
      Constructs the Pair object
      Parameters:
      first - First element of T type (generic)
      second - Second element of E type (generic)
  • Method Details

    • getFirst

      public T getFirst()
      Retrieves the first element
      Returns:
      The first element returned as the original T type (generic)
    • getSecond

      public E getSecond()
      Retrieves the second element
      Returns:
      The second element returned as the original E type (generic)
    • getHashCode

      public int getHashCode()
      Returns:
      int