de.caff.generics

## Interface NamedValue<T>

- All Superinterfaces:
    ITuple2<java.lang.String,T>

      public interface NamedValue<T>
      extends ITuple2<java.lang.String,T>

  A non-null value with a name.
  Since:
    December 25, 2022
  Author:
    Rammi

- - ### Nested Class Summary

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

      `ITuple2.Base<T1,T2>`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default java.lang.String` | `_1()` Get the first element.
    `default T` | `_2()` Get the second element.
    `default NamedNullableValue<T>` | `asNullable()` View this as a nullable value with a name.
    `java.lang.String` | `getName()` Get the name of the named value.
    `T` | `getValue()` Get the value.
    `static <V> NamedValue<V>` | `of(java.lang.String name, V value)` Create a named value.
    `static java.lang.String` | `toString(NamedValue<?> nv)` Default implementation for creating a string representation for a named value.

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

      `_21, asBase, 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, frozen, frozenNotNull, hash, invoke, sendTo, testBy, toString, toString, view`

- - ### Method Detail

    - #### getName

          @NotNull
          java.lang.String getName()

      Get the name of the named value.
      Returns:
        the name

    - #### getValue

          @NotNull
          T getValue()

      Get the value.
      Returns:
        the value

    - #### _1

          @NotNull
          default java.lang.String _1()

      Description copied from interface: `ITuple2`
      Get the first element.
      Specified by:
        `_1` in interface `ITuple2<java.lang.String,T>`
      Returns:
        first element

    - #### _2

          @NotNull
          default T _2()

      Description copied from interface: `ITuple2`
      Get the second element.
      Specified by:
        `_2` in interface `ITuple2<java.lang.String,T>`
      Returns:
        second element

    - #### asNullable

          @NotNull
          default NamedNullableValue<T> asNullable()

      View this as a nullable value with a name.
      Returns:
        nullable value view of this named value

    - #### of

          @NotNull
          static <V> NamedValue<V> of(@NotNull
                                               java.lang.String name,
                                               @NotNull
                                               V value)

      Create a named value.
      Type Parameters:
        `V` - value type
      Parameters:
        `name` - name
        `value` - value
      Returns:
        named value combination

    - #### toString

          @NotNull
          static java.lang.String toString(@NotNull
                                                    NamedValue<?> nv)

      Default implementation for creating a string representation for a named value.
      Parameters:
        `nv` - named value
      Returns:
        string representation