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.
| Constructor and Description | 
|---|
PairValueMapper(int keyIndex,
               int valueIndex)
Constructs a new  
PairValueMapper that constructs a pair from a tuple based on the key and value index. | 
| Modifier and Type | Method and Description | 
|---|---|
Pair<K,V> | 
apply(Tuple input)
Applies this function to the given argument. 
 | 
public PairValueMapper(int keyIndex,
                       int valueIndex)
Constructs a new PairValueMapper that constructs a pair from a tuple based on the key and value index.
keyIndex - the key indexvalueIndex - the value indexCopyright © 2022 The Apache Software Foundation. All rights reserved.