Class Pair<T1,​T2>

java.lang.Object
marauroa.common.Pair<T1,​T2>
Type Parameters:
T1 - type of first object
T2 - type of second object

public class Pair<T1,​T2> extends Object
a pair of two objects
  • Constructor Details

    • Pair

      public Pair(T1 o1, T2 o2)
      creates a new pair
      Parameters:
      o1 - first object
      o2 - second object
  • Method Details

    • first

      public T1 first()
      gets the first object
      Returns:
      first object
    • second

      public T2 second()
      gets the second object
      Returns:
      second object
    • setFirst

      public void setFirst(T1 o1)
      sets the first object
      Parameters:
      o1 - first object
    • setSecond

      public void setSecond(T2 o2)
      sets the second object
      Parameters:
      o2 - second object
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object