Class Triple<S,​U,​V>

  • Type Parameters:
    S - type of the first value
    U - type of the second value
    V - type of the third value
    All Implemented Interfaces:
    Serializable

    public class Triple<S,​U,​V>
    extends Object
    implements Serializable
    A convenience data structure encapsulating 3 values. This class can be used to return multiple values from a method call and create compound keys/values in other collections.
    Since:
    1.5.6 com.github.kilianB
    Author:
    Kilian
    See Also:
    Serialized Form
    • Constructor Detail

      • Triple

        public Triple​(S first,
                      U second,
                      V third)
        Parameters:
        first - element of the pair
        second - element of the pair
        third - tlement of the pair
      • Triple

        public Triple​(Triple<? extends S,​? extends U,​? extends V> original)
        Copy constructor.

        Creates a copy of the supplied entry. This is a soft clone referencing the same instances of the original pair.

        Parameters:
        original - the original pair to take the entries from.
    • Method Detail

      • getFirst

        public S getFirst()
        Returns:
        the first object stored in this triplet
      • getSecond

        public U getSecond()
        Returns:
        the second object stored in this triplet
      • getThird

        public V getThird()
        Returns:
        the second object stored in this triplet
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object