Class Tuple3<A,​B,​C>

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

    public class Tuple3<A,​B,​C>
    extends Object
    implements Serializable
    Tuple of three generic values.
    Author:
    Herbert Praehofer
    See Also:
    Serialized Form
    • 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.
    • Constructor Detail

      • Tuple3

        private Tuple3​(A v1,
                       B v2,
                       C v3)
        Private constructor.
        Parameters:
        v1 - the first value
        v2 - the second value
        v3 - the third value
    • Method Detail

      • of

        public static <A,​B,​C> Tuple3<A,​B,​C> of​(A v1,
                                                                       B v2,
                                                                       C v3)
        Creates a tuple of three value.
        Type Parameters:
        A - the type of the first value
        B - the type of the second value
        C - the type of the third value
        Parameters:
        v1 - the first value
        v2 - the second value
        v3 - the third value
        Returns:
        the tuple with three values
      • hashCode

        public int hashCode()
        Computes a hash code from the hash codes of the three 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 three and the three values are equal.
        Overrides:
        equals in class Object
        Parameters:
        obj - the other object
        Returns:
        true if the second object is a tuple of three and the three values are equal
      • toString

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