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:
  • Constructor Details

    • ValueMapper

      public ValueMapper(int index)
      Constructs a new ValueMapper that extracts the value at index 'i' from a tuple.
      Parameters:
      index - the index
  • Method Details

    • 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