org.apache.cassandra.hadoop
Class ColumnWritable

java.lang.Object
  extended by org.apache.cassandra.hadoop.ColumnWritable
All Implemented Interfaces:
java.lang.Comparable<ColumnWritable>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<ColumnWritable>

public class ColumnWritable
extends java.lang.Object
implements org.apache.hadoop.io.WritableComparable<ColumnWritable>

The ColumnWritable is a WritableComparable that denotes a column name and value.


Field Summary
static java.util.Comparator<byte[]> BYTE_ARRAY_COMPARATOR
           
 
Constructor Summary
ColumnWritable(byte[] name, byte[] value)
           
 
Method Summary
 int compareTo(ColumnWritable o)
          Compares two ColumnWritables.
 boolean equals(java.lang.Object o)
          Returns true iff o is a ColumnWritable with the same value.
 byte[] getName()
           
 byte[] getValue()
           
 int hashCode()
           
 void readFields(java.io.DataInput in)
           
 void setName(byte[] name)
           
 void setValue(byte[] value)
           
 java.lang.String toString()
           
 void write(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BYTE_ARRAY_COMPARATOR

public static final java.util.Comparator<byte[]> BYTE_ARRAY_COMPARATOR
Constructor Detail

ColumnWritable

public ColumnWritable(byte[] name,
                      byte[] value)
Method Detail

getValue

public byte[] getValue()

setValue

public void setValue(byte[] value)

getName

public byte[] getName()

setName

public void setName(byte[] name)

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
java.io.IOException

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object o)
Returns true iff o is a ColumnWritable with the same value.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(ColumnWritable o)
Compares two ColumnWritables.

Specified by:
compareTo in interface java.lang.Comparable<ColumnWritable>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 The Apache Software Foundation