Interface ValueMapper<V,​VR>

Type Parameters:
V - value type
VR - mapped value type

public interface ValueMapper<V,​VR>
The ValueMapper interface for mapping a value to a new value of arbitrary type. This is a stateless record-by-record operation, i.e, apply(Object) is invoked individually for each record of a stream (cf. ValueTransformer for stateful value transformation). If ValueMapper is applied to a key-value pair record the record's key is preserved. If a record's key and value should be modified KeyValueMapper can be used.
See Also:
KeyValueMapper, ValueTransformer, ValueTransformerWithKey, KStream.mapValues(ValueMapper), KStream.mapValues(ValueMapperWithKey), KStream.flatMapValues(ValueMapper), KStream.flatMapValues(ValueMapperWithKey), KTable.mapValues(ValueMapper), KTable.mapValues(ValueMapperWithKey)
  • Method Summary

    Modifier and Type Method Description
    VR apply​(V value)
    Map the given value to a new value.
  • Method Details

    • apply

      VR apply​(V value)
      Map the given value to a new value.
      Parameters:
      value - the value to be mapped
      Returns:
      the new value