|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avro.mapred.Pair<K,V>
public class Pair<K,V>
A key/value pair.
Method Summary | |
---|---|
int |
compareTo(Pair that)
|
boolean |
equals(Object o)
|
Object |
get(int i)
Return the value of a field given its position in the schema. |
static Schema |
getKeySchema(Schema pair)
Return a pair's key schema. |
static Schema |
getPairSchema(Schema key,
Schema value)
Get a pair schema. |
Schema |
getSchema()
The schema of this instance. |
static Schema |
getValueSchema(Schema pair)
Return a pair's value schema. |
int |
hashCode()
|
K |
key()
Get the key. |
void |
key(K key)
Set the key. |
void |
put(int i,
Object o)
Set the value of a field given its position in the schema. |
void |
set(K key,
V value)
Set both the key and value. |
String |
toString()
|
V |
value()
Get the value. |
void |
value(V value)
Set the value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Pair(Schema schema)
public Pair(K key, Schema keySchema, V value, Schema valueSchema)
public Pair(Object key, Object value)
public Pair(Object key, GenericContainer value)
public Pair(Object key, CharSequence value)
public Pair(Object key, ByteBuffer value)
public Pair(Object key, Integer value)
public Pair(Object key, Long value)
public Pair(Object key, Float value)
public Pair(Object key, Double value)
public Pair(Object key, Void value)
public Pair(GenericContainer key, Object value)
public Pair(GenericContainer key, GenericContainer value)
public Pair(GenericContainer key, CharSequence value)
public Pair(GenericContainer key, ByteBuffer value)
public Pair(GenericContainer key, Integer value)
public Pair(GenericContainer key, Long value)
public Pair(GenericContainer key, Float value)
public Pair(GenericContainer key, Double value)
public Pair(GenericContainer key, Void value)
public Pair(CharSequence key, Object value)
public Pair(CharSequence key, GenericContainer value)
public Pair(CharSequence key, CharSequence value)
public Pair(CharSequence key, ByteBuffer value)
public Pair(CharSequence key, Integer value)
public Pair(CharSequence key, Long value)
public Pair(CharSequence key, Float value)
public Pair(CharSequence key, Double value)
public Pair(CharSequence key, Void value)
public Pair(ByteBuffer key, Object value)
public Pair(ByteBuffer key, GenericContainer value)
public Pair(ByteBuffer key, CharSequence value)
public Pair(ByteBuffer key, ByteBuffer value)
public Pair(ByteBuffer key, Integer value)
public Pair(ByteBuffer key, Long value)
public Pair(ByteBuffer key, Float value)
public Pair(ByteBuffer key, Double value)
public Pair(ByteBuffer key, Void value)
public Pair(Integer key, Object value)
public Pair(Integer key, GenericContainer value)
public Pair(Integer key, CharSequence value)
public Pair(Integer key, ByteBuffer value)
public Pair(Integer key, Integer value)
public Pair(Integer key, Long value)
public Pair(Integer key, Float value)
public Pair(Integer key, Double value)
public Pair(Integer key, Void value)
public Pair(Long key, Object value)
public Pair(Long key, GenericContainer value)
public Pair(Long key, CharSequence value)
public Pair(Long key, ByteBuffer value)
public Pair(Long key, Integer value)
public Pair(Long key, Long value)
public Pair(Long key, Float value)
public Pair(Long key, Double value)
public Pair(Long key, Void value)
public Pair(Float key, Object value)
public Pair(Float key, GenericContainer value)
public Pair(Float key, CharSequence value)
public Pair(Float key, ByteBuffer value)
public Pair(Float key, Integer value)
public Pair(Float key, Long value)
public Pair(Float key, Float value)
public Pair(Float key, Double value)
public Pair(Float key, Void value)
public Pair(Double key, Object value)
public Pair(Double key, GenericContainer value)
public Pair(Double key, CharSequence value)
public Pair(Double key, ByteBuffer value)
public Pair(Double key, Integer value)
public Pair(Double key, Long value)
public Pair(Double key, Float value)
public Pair(Double key, Double value)
public Pair(Double key, Void value)
public Pair(Void key, Object value)
public Pair(Void key, GenericContainer value)
public Pair(Void key, CharSequence value)
public Pair(Void key, ByteBuffer value)
public Pair(Void key, Integer value)
public Pair(Void key, Long value)
public Pair(Void key, Float value)
public Pair(Void key, Double value)
public Pair(Void key, Void value)
Method Detail |
---|
public static Schema getKeySchema(Schema pair)
public static Schema getValueSchema(Schema pair)
public static Schema getPairSchema(Schema key, Schema value)
public Schema getSchema()
GenericContainer
getSchema
in interface GenericContainer
public K key()
public void key(K key)
public V value()
public void value(V value)
public void set(K key, V value)
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Pair that)
compareTo
in interface Comparable<Pair>
public String toString()
toString
in class Object
public Object get(int i)
IndexedRecord
This method is not meant to be called by user code, but only by DatumWriter
implementations.
get
in interface IndexedRecord
public void put(int i, Object o)
IndexedRecord
This method is not meant to be called by user code, but only by DatumReader
implementations.
put
in interface IndexedRecord
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |