Package org.apache.storm.streams.operations.mappers

## Class ValueMapper<T>

- java.lang.Object
- - org.apache.storm.streams.operations.mappers.ValueMapper<T>

- Type Parameters:
    `T` - the value type
  All Implemented Interfaces:
    `Serializable`, `Function<Tuple,​T>`, `TupleValueMapper<T>`, `Operation`

      public class ValueMapper<T>
      extends Object
      implements TupleValueMapper<T>

  Extracts a single typed value from a tuple.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ValueMapper​(int index)` | Constructs a new `ValueMapper` that extracts the value at index 'i' from a tuple.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `T` | `apply​(Tuple input)` | Applies this function to the given argument.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ValueMapper

          public ValueMapper​(int index)

      Constructs a new `ValueMapper` that extracts the value at index 'i' from a tuple.
      Parameters:
        `index` - the index

  - ### Method Detail

    - #### apply

          public T apply​(Tuple input)

      Description copied from interface: `Function`
      Applies this function to the given argument.
      Specified by:
        `apply` in interface `Function<Tuple,​T>`
      Parameters:
        `input` - the input to the function
      Returns:
        the function result