com.h3c.util.tuple

## Class Quadruplet<T1,T2,T3,T4>

- java.lang.Object
- - com.h3c.util.tuple.UnaryTuple<T1>
  - - com.h3c.util.tuple.Pair<T1,T2>
    - - com.h3c.util.tuple.Triplet<T1,T2,T3>
      - - com.h3c.util.tuple.Quadruplet<T1,T2,T3,T4>

- Type Parameters:
    `T1` - Type for the first element of the tuple.
    `T2` - Type for the second element of the tuple.
    `T3` - Type for the third element of the tuple.
    `T4` - Type for the fourth element of the tuple.
  All Implemented Interfaces:
    Serializable

      public class Quadruplet<T1,T2,T3,T4>
      extends Triplet<T1,T2,T3>

  In mathematics and computer science a tuple captures the intuitive notion of an ordered list of elements. Depending on the mathematical foundation chosen, the formal notion differs slightly. In set theory, an (ordered) n-tuple is a sequence (or ordered list) of n elements, where n is a positive integer. The main properties that distinguish a tuple from, for example, a set are that 1. It can contain an object more than once; 2. The objects appear in a certain order; 3. It has finite size.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Quadruplet(T1 first, T2 second, T3 third, T4 fourth)` Constructs a 4-tuple.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `T4` | `getFourth()` Gets the fourth element of the tuple.
    `int` | `hashCode()`
    `void` | `setFourth(T4 fourth)` Sets the fourth element of the tuple.
    `String` | `toString()`
    `static <TT1,TT2,TT3,TT4> Quadruplet<TT1,TT2,TT3,TT4>` | `valueOf(TT1 first, TT2 second, TT3 third, TT4 fourth)` Creates a new 4-tuple using the given values.

    - ### Methods inherited from class com.h3c.util.tuple.Triplet

      `getThird, setThird, valueOf`

    - ### Methods inherited from class com.h3c.util.tuple.Pair

      `getSecond, setSecond, valueOf`

    - ### Methods inherited from class com.h3c.util.tuple.UnaryTuple

      `getFirst, setFirst, valueOf`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Quadruplet

          protected Quadruplet(T1 first,
                    T2 second,
                    T3 third,
                    T4 fourth)

      Constructs a 4-tuple.
      Parameters:
        `first` - First element in the tuple.
        `second` - Second element in the tuple.
        `third` - Third element in the tuple.
        `fourth` - Fourth element in the tuple.

  - ### Method Detail

    - #### valueOf

          public static <TT1,TT2,TT3,TT4> Quadruplet<TT1,TT2,TT3,TT4> valueOf(TT1 first,
                                                              TT2 second,
                                                              TT3 third,
                                                              TT4 fourth)

      Creates a new 4-tuple using the given values.
      Type Parameters:
        `TT1` - the type for the first element of the tuple.
        `TT2` - the type for the second element of the tuple.
        `TT3` - the type for the third element of the tuple.
        `TT4` - the type for the fourth element of the tuple.
      Parameters:
        `first` - First element in the tuple.
        `second` - Second element in the tuple.
        `third` - Third element in the tuple.
        `fourth` - Fourth element in the tuple.
      Returns:
        a new 3-tuple using the given values.

    - #### getFourth

          public T4 getFourth()

      Gets the fourth element of the tuple.
      Returns:
        The fourth element.

    - #### setFourth

          public void setFourth(T4 fourth)

      Sets the fourth element of the tuple.
      Parameters:
        `fourth` - The fourth element.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Triplet<T1,T2,T3>`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Triplet<T1,T2,T3>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Triplet<T1,T2,T3>`

Copyright © 2014. All Rights Reserved.