de.caff.generics.tuple

## Class NTuple3<T1,T2,T3>

- java.lang.Object
- - de.caff.generics.tuple.ITuple3.Base<T1,T2,T3>
  - - de.caff.generics.tuple.NTuple3<T1,T2,T3>

- Type Parameters:
    `T1` - type of first element
    `T2` - type of second element
    `T3` - type of third element
  All Implemented Interfaces:
    ITuple3<T1,T2,T3>, java.io.Serializable

      public class NTuple3<T1,T2,T3>
      extends ITuple3.Base<T1,T2,T3>
      implements java.io.Serializable

  Immutable tuple with 3 nullable elements. If you want to iterate over a tuple or access its elements by index (note that both is only possible for a common super type of the tuple's types) `Indexable.viewTuple(ITuple3)` will come to help. Note that this class is automatically created by `tools.TupleClassCreator` (not yet public).
  Since:
    November 17, 2021
  Author:
    Rammi
  See Also:
    `Tuple3`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface de.caff.generics.tuple.ITuple3

      `ITuple3.Base<T1,T2,T3>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NTuple3(T1 e1, T2 e2, T3 e3)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T1` | `_1()` Get the first element.
    `NTuple2<T1,T2>` | `_12()` Create a new 2-tuple from this one where the elements are ordered: 1st, 2nd.
    `NTuple2<T1,T3>` | `_13()` Create a new 2-tuple from this one where the elements are ordered: 1st, 3rd.
    `NTuple3<T1,T3,T2>` | `_132()` Create a new 3-tuple from this one where the elements are ordered: 1st, 3rd, 2nd.
    `T2` | `_2()` Get the second element.
    `NTuple2<T2,T1>` | `_21()` Create a new 2-tuple from this one where the elements are ordered: 2nd, 1st.
    `NTuple3<T2,T1,T3>` | `_213()` Create a new 3-tuple from this one where the elements are ordered: 2nd, 1st, 3rd.
    `NTuple2<T2,T3>` | `_23()` Create a new 2-tuple from this one where the elements are ordered: 2nd, 3rd.
    `NTuple3<T2,T3,T1>` | `_231()` Create a new 3-tuple from this one where the elements are ordered: 2nd, 3rd, 1st.
    `T3` | `_3()` Get the third element.
    `NTuple2<T3,T1>` | `_31()` Create a new 2-tuple from this one where the elements are ordered: 3rd, 1st.
    `NTuple3<T3,T1,T2>` | `_312()` Create a new 3-tuple from this one where the elements are ordered: 3rd, 1st, 2nd.
    `NTuple2<T3,T2>` | `_32()` Create a new 2-tuple from this one where the elements are ordered: 3rd, 2nd.
    `NTuple3<T3,T2,T1>` | `_321()` Create a new 3-tuple from this one where the elements are ordered: 3rd, 2nd, 1st.
    `NTuple3<T1,T2,T3>` | `frozen()` Convert this into an object of a concrete tuple implementation.
    `<T> NTuple4<T,T1,T2,T3>` | `i1(T e1)` Create a 4-tuple from this 3-tuple by inserting a new first element.
    `<T> NTuple4<T1,T,T2,T3>` | `i2(T e2)` Create a 4-tuple from this 3-tuple by inserting a new second element.
    `<T> NTuple4<T1,T2,T,T3>` | `i3(T e3)` Create a 4-tuple from this 3-tuple by inserting a new third element.
    `<T> NTuple4<T1,T2,T3,T>` | `i4(T e4)` Create a 4-tuple from this 3-tuple by adding a new fourth element.
    `java.lang.String` | `toString()`
    `<E1> NTuple3<E1,T2,T3>` | `x1(E1 e1)` Create a 3-tuple from this one where the first element is exchanged.
    `<E1,E2> NTuple3<E1,E2,T3>` | `x12(E1 e1, E2 e2)` Create a 3-tuple from this one where the first and second elements are exchanged.
    `<E1,E3> NTuple3<E1,T2,E3>` | `x13(E1 e1, E3 e3)` Create a 3-tuple from this one where the first and third elements are exchanged.
    `<E2> NTuple3<T1,E2,T3>` | `x2(E2 e2)` Create a 3-tuple from this one where the second element is exchanged.
    `<E2,E3> NTuple3<T1,E2,E3>` | `x23(E2 e2, E3 e3)` Create a 3-tuple from this one where the second and third elements are exchanged.
    `<E3> NTuple3<T1,T2,E3>` | `x3(E3 e3)` Create a 3-tuple from this one where the third element is exchanged.

    - ### Methods inherited from class de.caff.generics.tuple.ITuple3.Base

      `asBase, equals, hashCode`

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

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

    - ### Methods inherited from interface de.caff.generics.tuple.ITuple3

      `concat1, concat2, concat3, concat4, concat5, concat6, concat7, concat8, concatPred1, concatPred2, concatPred3, concatPred4, concatPred5, concatPred6, concatPred7, concatPred8, concatProc1, concatProc2, concatProc3, concatProc4, concatProc5, concatProc6, concatProc7, concatProc8, equals, frozenNotNull, hash, invoke, sendTo, testBy, toString, toString, view`

- - ### Constructor Detail

    - #### NTuple3

          public NTuple3(@Nullable
                         T1 e1,
                         @Nullable
                         T2 e2,
                         @Nullable
                         T3 e3)

      Constructor.
      Parameters:
        `e1` - first element
        `e2` - second element
        `e3` - third element

  - ### Method Detail

    - #### _1

          @Nullable
          public T1 _1()

      Description copied from interface: `ITuple3`
      Get the first element.
      Specified by:
        `_1` in interface `ITuple3<T1,T2,T3>`
      Returns:
        first element

    - #### _2

          @Nullable
          public T2 _2()

      Description copied from interface: `ITuple3`
      Get the second element.
      Specified by:
        `_2` in interface `ITuple3<T1,T2,T3>`
      Returns:
        second element

    - #### _3

          @Nullable
          public T3 _3()

      Description copied from interface: `ITuple3`
      Get the third element.
      Specified by:
        `_3` in interface `ITuple3<T1,T2,T3>`
      Returns:
        third element

    - #### _132

          @NotNull
          public NTuple3<T1,T3,T2> _132()

      Description copied from interface: `ITuple3`
      Create a new 3-tuple from this one where the elements are ordered: 1st, 3rd, 2nd.
      Specified by:
        `_132` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### _312

          @NotNull
          public NTuple3<T3,T1,T2> _312()

      Description copied from interface: `ITuple3`
      Create a new 3-tuple from this one where the elements are ordered: 3rd, 1st, 2nd.
      Specified by:
        `_312` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### _321

          @NotNull
          public NTuple3<T3,T2,T1> _321()

      Description copied from interface: `ITuple3`
      Create a new 3-tuple from this one where the elements are ordered: 3rd, 2nd, 1st.
      Specified by:
        `_321` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### _231

          @NotNull
          public NTuple3<T2,T3,T1> _231()

      Description copied from interface: `ITuple3`
      Create a new 3-tuple from this one where the elements are ordered: 2nd, 3rd, 1st.
      Specified by:
        `_231` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### _213

          @NotNull
          public NTuple3<T2,T1,T3> _213()

      Description copied from interface: `ITuple3`
      Create a new 3-tuple from this one where the elements are ordered: 2nd, 1st, 3rd.
      Specified by:
        `_213` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### _12

          @NotNull
          public NTuple2<T1,T2> _12()

      Description copied from interface: `ITuple3`
      Create a new 2-tuple from this one where the elements are ordered: 1st, 2nd.
      Specified by:
        `_12` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### _21

          @NotNull
          public NTuple2<T2,T1> _21()

      Description copied from interface: `ITuple3`
      Create a new 2-tuple from this one where the elements are ordered: 2nd, 1st.
      Specified by:
        `_21` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### _13

          @NotNull
          public NTuple2<T1,T3> _13()

      Description copied from interface: `ITuple3`
      Create a new 2-tuple from this one where the elements are ordered: 1st, 3rd.
      Specified by:
        `_13` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### _31

          @NotNull
          public NTuple2<T3,T1> _31()

      Description copied from interface: `ITuple3`
      Create a new 2-tuple from this one where the elements are ordered: 3rd, 1st.
      Specified by:
        `_31` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### _23

          @NotNull
          public NTuple2<T2,T3> _23()

      Description copied from interface: `ITuple3`
      Create a new 2-tuple from this one where the elements are ordered: 2nd, 3rd.
      Specified by:
        `_23` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### _32

          @NotNull
          public NTuple2<T3,T2> _32()

      Description copied from interface: `ITuple3`
      Create a new 2-tuple from this one where the elements are ordered: 3rd, 2nd.
      Specified by:
        `_32` in interface `ITuple3<T1,T2,T3>`
      Returns:
        reordered tuple

    - #### frozen

          @NotNull
          public NTuple3<T1,T2,T3> frozen()

      Description copied from interface: `ITuple3`
      Convert this into an object of a concrete tuple implementation. This is useful because implementations may just be a view of something else. This method makes sure to decouple the tuple from the viewed object. The resulting tuple may contain `null` elements, see `ITuple3.frozenNotNull()` for a method which returns tuples which don't have nullable elements.
      Specified by:
        `frozen` in interface `ITuple3<T1,T2,T3>`
      Returns:
        standalone tuple object

    - #### x1

          @NotNull
          public <E1> NTuple3<E1,T2,T3> x1(@Nullable
                                                    E1 e1)

      Create a 3-tuple from this one where the first element is exchanged.
      Type Parameters:
        `E1` - type of exchanged first element
      Parameters:
        `e1` - new first element
      Returns:
        tuple with exchanged element

    - #### x2

          @NotNull
          public <E2> NTuple3<T1,E2,T3> x2(@Nullable
                                                    E2 e2)

      Create a 3-tuple from this one where the second element is exchanged.
      Type Parameters:
        `E2` - type of exchanged second element
      Parameters:
        `e2` - new second element
      Returns:
        tuple with exchanged element

    - #### x3

          @NotNull
          public <E3> NTuple3<T1,T2,E3> x3(@Nullable
                                                    E3 e3)

      Create a 3-tuple from this one where the third element is exchanged.
      Type Parameters:
        `E3` - type of exchanged third element
      Parameters:
        `e3` - new third element
      Returns:
        tuple with exchanged element

    - #### x12

          @NotNull
          public <E1,E2> NTuple3<E1,E2,T3> x12(@Nullable
                                                        E1 e1,
                                                        @Nullable
                                                        E2 e2)

      Create a 3-tuple from this one where the first and second elements are exchanged.
      Type Parameters:
        `E1` - type of exchanged first element
        `E2` - type of exchanged second element
      Parameters:
        `e1` - new first element
        `e2` - new second element
      Returns:
        tuple with exchanged elements

    - #### x13

          @NotNull
          public <E1,E3> NTuple3<E1,T2,E3> x13(@Nullable
                                                        E1 e1,
                                                        @Nullable
                                                        E3 e3)

      Create a 3-tuple from this one where the first and third elements are exchanged.
      Type Parameters:
        `E1` - type of exchanged first element
        `E3` - type of exchanged third element
      Parameters:
        `e1` - new first element
        `e3` - new third element
      Returns:
        tuple with exchanged elements

    - #### x23

          @NotNull
          public <E2,E3> NTuple3<T1,E2,E3> x23(@Nullable
                                                        E2 e2,
                                                        @Nullable
                                                        E3 e3)

      Create a 3-tuple from this one where the second and third elements are exchanged.
      Type Parameters:
        `E2` - type of exchanged second element
        `E3` - type of exchanged third element
      Parameters:
        `e2` - new second element
        `e3` - new third element
      Returns:
        tuple with exchanged elements

    - #### i1

          @NotNull
          public <T> NTuple4<T,T1,T2,T3> i1(@Nullable
                                                     T e1)

      Create a 4-tuple from this 3-tuple by inserting a new first element.
      Type Parameters:
        `T` - new element type
      Parameters:
        `e1` - new element
      Returns:
        4-tuple

    - #### i2

          @NotNull
          public <T> NTuple4<T1,T,T2,T3> i2(@Nullable
                                                     T e2)

      Create a 4-tuple from this 3-tuple by inserting a new second element.
      Type Parameters:
        `T` - new element type
      Parameters:
        `e2` - new element
      Returns:
        4-tuple

    - #### i3

          @NotNull
          public <T> NTuple4<T1,T2,T,T3> i3(@Nullable
                                                     T e3)

      Create a 4-tuple from this 3-tuple by inserting a new third element.
      Type Parameters:
        `T` - new element type
      Parameters:
        `e3` - new element
      Returns:
        4-tuple

    - #### i4

          @NotNull
          public <T> NTuple4<T1,T2,T3,T> i4(@Nullable
                                                     T e4)

      Create a 4-tuple from this 3-tuple by adding a new fourth element.
      Type Parameters:
        `T` - new element type
      Parameters:
        `e4` - new element
      Returns:
        4-tuple

    - #### toString

          @NotNull
          public java.lang.String toString()

      Overrides:
        `toString` in class `ITuple3.Base<T1,T2,T3>`