org.apache.crunch.types.writable
Class WritablePairConverter<K,V>

java.lang.Object
  extended by org.apache.crunch.types.writable.WritablePairConverter<K,V>
All Implemented Interfaces:
Serializable, Converter<K,V,Pair<K,V>,Pair<K,Iterable<V>>>

public class WritablePairConverter<K,V>
extends Object
implements Converter<K,V,Pair<K,V>,Pair<K,Iterable<V>>>

See Also:
Serialized Form

Constructor Summary
WritablePairConverter(Class<K> keyClass, Class<V> valueClass)
           
 
Method Summary
 Pair<K,V> convertInput(K key, V value)
           
 Pair<K,Iterable<V>> convertIterableInput(K key, Iterable<V> value)
           
 Class<K> getKeyClass()
           
 Class<V> getValueClass()
           
 K outputKey(Pair<K,V> value)
           
 V outputValue(Pair<K,V> value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WritablePairConverter

public WritablePairConverter(Class<K> keyClass,
                             Class<V> valueClass)
Method Detail

convertInput

public Pair<K,V> convertInput(K key,
                              V value)
Specified by:
convertInput in interface Converter<K,V,Pair<K,V>,Pair<K,Iterable<V>>>

outputKey

public K outputKey(Pair<K,V> value)
Specified by:
outputKey in interface Converter<K,V,Pair<K,V>,Pair<K,Iterable<V>>>

outputValue

public V outputValue(Pair<K,V> value)
Specified by:
outputValue in interface Converter<K,V,Pair<K,V>,Pair<K,Iterable<V>>>

getKeyClass

public Class<K> getKeyClass()
Specified by:
getKeyClass in interface Converter<K,V,Pair<K,V>,Pair<K,Iterable<V>>>

getValueClass

public Class<V> getValueClass()
Specified by:
getValueClass in interface Converter<K,V,Pair<K,V>,Pair<K,Iterable<V>>>

convertIterableInput

public Pair<K,Iterable<V>> convertIterableInput(K key,
                                                Iterable<V> value)
Specified by:
convertIterableInput in interface Converter<K,V,Pair<K,V>,Pair<K,Iterable<V>>>


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.