Class Tuple5<A,​B,​C,​D,​E>

  • Type Parameters:
    A - the type of the first value
    B - the type of the second value
    C - the type of the third value
    D - the type of the fourth value
    E - the type of the fifth value
    All Implemented Interfaces:
    Serializable

    public class Tuple5<A,​B,​C,​D,​E>
    extends Object
    implements Serializable
    Tuple of five generic values.
    Author:
    Herbert Praehofer
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      A v1
      The first value.
      B v2
      The second value.
      C v3
      The third value.
      D v4
      The fourth value.
      E v5
      The fifth value.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Tuple5​(A v1, B v2, C v3, D v4, E v5)
      Private constructor.
    • Field Detail

      • v1

        public final A v1
        The first value.
      • v2

        public final B v2
        The second value.
      • v3

        public final C v3
        The third value.
      • v4

        public final D v4
        The fourth value.
      • v5

        public final E v5
        The fifth value.
    • Constructor Detail

      • Tuple5

        private Tuple5​(A v1,
                       B v2,
                       C v3,
                       D v4,
                       E v5)
        Private constructor.
        Parameters:
        v1 - the first value
        v2 - the second value
        v3 - the third value
        v4 - the fourth value
        v5 - the fifth value
    • Method Detail

      • of

        public static <A,​B,​C,​D,​E> Tuple5<A,​B,​C,​D,​E> of​(A v1,
                                                                                                       B v2,
                                                                                                       C v3,
                                                                                                       D v4,
                                                                                                       E v5)
        Creates a tuple of five value.
        Type Parameters:
        A - the type of the first value
        B - the type of the second value
        C - the type of the third value
        D - the type of the fourth value
        E - the type of the fifth value
        Parameters:
        v1 - the first value
        v2 - the second value
        v3 - the third value
        v4 - the fourth value
        v5 - the fifth value
        Returns:
        the tuple with four values
      • hashCode

        public int hashCode()
        Computes a hash code from the hash codes of the five values.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code
      • equals

        public boolean equals​(Object obj)
        Compares this tuple object and the other object for equality. They are equal if the second object is a tuple of five and the five values are equal.
        Overrides:
        equals in class Object
        Parameters:
        obj - the other object
        Returns:
        true if the second object is a tuple of five and the five values are equal
      • toString

        public String toString()
        Returns a string representation.
        Overrides:
        toString in class Object
        Returns:
        string representation