Class Triple<X,​Y,​Z>

  • Type Parameters:
    X - First element type
    Y - Second element type
    Z - Third element type
    All Implemented Interfaces:
    Serializable

    public final class Triple<X,​Y,​Z>
    extends Object
    implements Serializable
    This class represents a tuple of three elements.
    See Also:
    Serialized Form
    • Constructor Detail

      • Triple

        public Triple()
        Triple empty constructor
      • Triple

        public Triple​(X newfirst,
                      Y newsecond,
                      Z newthird)
        Triple constructor
        Parameters:
        newfirst - First element
        newsecond - Second element
        newthird - Third element
    • Method Detail

      • getFirst

        public X getFirst()
        Get the Tuple::first
        Returns:
        the first
      • setFirst

        public void setFirst​(X newfirst)
        Set the Tuple::first
        Parameters:
        newfirst - the first to set
      • getSecond

        public Y getSecond()
        Get the Tuple::second
        Returns:
        the second
      • setSecond

        public void setSecond​(Y newsecond)
        Set the Tuple::second
        Parameters:
        newsecond - the second to set
      • getThird

        public Z getThird()
        Get the Tuple::third
        Returns:
        the third
      • setThird

        public void setThird​(Z newthird)
        Set the Tuple::third
        Parameters:
        newthird - the third to set
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object