Class Triplet<A,B,C>

java.lang.Object
org.dizitart.no2.common.tuples.Triplet<A,B,C>
Type Parameters:
A - the type of the first element
B - the type of the second element
C - the type of the third element
All Implemented Interfaces:
Serializable

public class Triplet<A,B,C> extends Object implements Serializable
A generic class representing a tuple of three elements.
Since:
4.0
Author:
Anindya Chatterjee.
See Also:
  • Constructor Details

    • Triplet

      public Triplet()
    • Triplet

      public Triplet(A first, B second, C third)
  • Method Details

    • triplet

      public static <A, B, C> Triplet<A,B,C> triplet(A a, B b, C c)
      Creates a new triplet.
      Type Parameters:
      A - the type parameter
      B - the type parameter
      C - the type parameter
      Parameters:
      a - the a
      b - the b
      c - the c
      Returns:
      the triplet
    • getFirst

      public A getFirst()
    • getSecond

      public B getSecond()
    • getThird

      public C getThird()
    • setFirst

      public void setFirst(A first)
    • setSecond

      public void setSecond(B second)
    • setThird

      public void setThird(C third)
    • 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