Class Triple<E,​F,​G>

  • Type Parameters:
    E - the type of the first element
    F - the type of the second element
    G - the type of the third element

    public class Triple<E,​F,​G>
    extends Object
    This class implements a simple triple of elements.
    Author:
    Matthias Thimm
    • Constructor Summary

      Constructors 
      Constructor Description
      Triple()
      Initializes an empty triple.
      Triple​(E obj1, F obj2, G obj3)
      Initializes the elements of this triple with the given parameters
    • Constructor Detail

      • Triple

        public Triple​(E obj1,
                      F obj2,
                      G obj3)
        Initializes the elements of this triple with the given parameters
        Parameters:
        obj1 - the first element of this triple
        obj2 - the second element of this triple
        obj3 - the third element of this triple
      • Triple

        public Triple()
        Initializes an empty triple.
    • Method Detail

      • getFirst

        public E getFirst()
        returns the first element of this triple
        Returns:
        the first element of this triple
      • setFirst

        public void setFirst​(E obj1)
        sets the first element of this triple
        Parameters:
        obj1 - an object of type E
      • getSecond

        public F getSecond()
        returns the second element of this triple
        Returns:
        the second element of this triple
      • setSecond

        public void setSecond​(F obj2)
        sets the second element of this triple
        Parameters:
        obj2 - an object of type F
      • getThird

        public G getThird()
        returns the third element of this triple
        Returns:
        the third element of this triple
      • setThird

        public void setThird​(G obj3)
        sets the third element of this triple
        Parameters:
        obj3 - an object of type G
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object