@Test public void testCompareTo() { Value v1 = new Value(DATA); Value v2 = new Value(toBytes("datb")); assertTrue(v1.compareTo(v2) < 0); assertTrue(v2.compareTo(v1) > 0); Value v1a = new Value(DATA); assertEquals(0, v1.compareTo(v1a)); Value v3 = new Value(toBytes("datc")); assertTrue(v2.compareTo(v3) < 0); assertTrue(v1.compareTo(v3) < 0); }
@Override public int compareTo(Object right_obj) { return compareTo(((Value) right_obj).get()); }
Value implements WritableComparable<Object> { @Override public int compareTo(Object right_obj) { return compareTo(((Value) right_obj).get()); } }
Value implements WritableComparable<Object> { @Override public int compareTo(Object right_obj) { return compareTo(((Value) right_obj).get()); } Value();  Value(CharSequence cs);  Value(Text text);  Value(byte[] bytes);  Value(ByteBuffer bytes);  Value(byte[] bytes, boolean copy);  Value(final Value ibw);  Value(final byte[] newData, final int offset, final int length); }
Value implements WritableComparable<Object> { @Override public int compareTo(Object right_obj) { return compareTo(((Value) right_obj).get()); } Value();  Value(CharSequence cs);  Value(Text text);  Value(byte[] bytes);  Value(ByteBuffer bytes);  Value(byte[] bytes, boolean copy);  Value(final Value ibw);  Value(final byte[] newData, final int offset, final int length); byte[] get(); void set(final byte[] b); void copy(byte[] b); int getSize(); @Override void readFields(final DataInput in); @Override void write(final DataOutput out); @Override int hashCode(); @Override int compareTo(Object right_obj); int compareTo(final byte[] that); @Override boolean equals(Object right_obj); boolean contentEquals(byte[] right_obj); @Override String toString(); }
Value implements WritableComparable<Object> { @Override public int compareTo(Object right_obj) { return compareTo(((Value) right_obj).get()); } Value();  Value(CharSequence cs);  Value(Text text);  Value(byte[] bytes);  Value(ByteBuffer bytes);  Value(byte[] bytes, boolean copy);  Value(final Value ibw);  Value(final byte[] newData, final int offset, final int length); byte[] get(); void set(final byte[] b); void copy(byte[] b); int getSize(); @Override void readFields(final DataInput in); @Override void write(final DataOutput out); @Override int hashCode(); @Override int compareTo(Object right_obj); int compareTo(final byte[] that); @Override boolean equals(Object right_obj); boolean contentEquals(byte[] right_obj); @Override String toString();  }