Interface KeyValueMapper<K,V,VR>
- Type Parameters:
K- key typeV- value typeVR- mapped value type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The
KeyValueMapper interface for mapping a key-value pair to a new value of arbitrary type. For example, it can be used to - map from an input
KeyValuepair to an outputKeyValuepair with different key and/or value type (for this case output typeVR ==KeyValue<NewKeyType,NewValueType>) - map from an input record to a new key (with arbitrary key type as specified by
VR)
apply(Object, Object) is invoked individually for each record of a stream (cf. api.Processor for stateful record transformation). KeyValueMapper is a generalization of ValueMapper.- See Also:
Method Summary
Method Details
apply