Class PairValueMapper<K,V>
- java.lang.Object
-
- org.apache.storm.streams.operations.mappers.PairValueMapper<K,V>
-
- Type Parameters:
K
- the key typeV
- the value type
- All Implemented Interfaces:
Serializable
,Function<Tuple,Pair<K,V>>
,TupleValueMapper<Pair<K,V>>
,Operation
,PairFunction<Tuple,K,V>
public class PairValueMapper<K,V> extends Object implements TupleValueMapper<Pair<K,V>>, PairFunction<Tuple,K,V>
Extracts a typed key-value pair from a tuple.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PairValueMapper(int keyIndex, int valueIndex)
Constructs a newPairValueMapper
that constructs a pair from a tuple based on the key and value index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<K,V>
apply(Tuple input)
Applies this function to the given argument.
-
-
-
Constructor Detail
-
PairValueMapper
public PairValueMapper(int keyIndex, int valueIndex)
Constructs a newPairValueMapper
that constructs a pair from a tuple based on the key and value index.- Parameters:
keyIndex
- the key indexvalueIndex
- the value index
-
-