Class 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:
    Serialized Form
    • Constructor Detail

      • Triplet

        public Triplet()
      • Triplet

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

      • 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)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object