@Test public void testCompareTo() { byte[] a = Bytes.toBytes("a"); byte[] b = Bytes.toBytes("b"); Column columnA = new Column(a, b); Column columnB = new Column(a, b); Assert.assertEquals(0, columnA.compareTo(columnB)); columnA = new Column(a, a); columnB = new Column(a, b); Assert.assertEquals(-1, columnA.compareTo(columnB)); columnA = new Column(a, b); columnB = new Column(b, a); Assert.assertEquals(-1, columnA.compareTo(columnB)); columnA = new Column(a, b); columnB = new Column(a, a); Assert.assertEquals(1, columnA.compareTo(columnB)); columnA = new Column(b, a); columnB = new Column(a, b); Assert.assertEquals(1, columnA.compareTo(columnB)); }
public int compareTo(Column other) { int ret = Bytes.compareTo(this.family, other.family); if (ret == 0) { return Bytes.compareTo(this.qualifier, other.qualifier); } return ret; }
Column implements Writable, Comparable<Column> { public int compareTo(Column other) { int ret = Bytes.compareTo(this.family, other.family); if (ret == 0) { return Bytes.compareTo(this.qualifier, other.qualifier); } return ret; } }
Column implements Writable, Comparable<Column> { public int compareTo(Column other) { int ret = Bytes.compareTo(this.family, other.family); if (ret == 0) { return Bytes.compareTo(this.qualifier, other.qualifier); } return ret; } Column();  Column(byte[] family, byte[] qualifier);  Column(Column column);  Column(String family, String qualifier); }
Column implements Writable, Comparable<Column> { public int compareTo(Column other) { int ret = Bytes.compareTo(this.family, other.family); if (ret == 0) { return Bytes.compareTo(this.qualifier, other.qualifier); } return ret; } Column();  Column(byte[] family, byte[] qualifier);  Column(Column column);  Column(String family, String qualifier); byte[] getFamily(); byte[] getQualifier(); void write(DataOutput out); void readFields(DataInput in); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString(); int compareTo(Column other); }
Column implements Writable, Comparable<Column> { public int compareTo(Column other) { int ret = Bytes.compareTo(this.family, other.family); if (ret == 0) { return Bytes.compareTo(this.qualifier, other.qualifier); } return ret; } Column();  Column(byte[] family, byte[] qualifier);  Column(Column column);  Column(String family, String qualifier); byte[] getFamily(); byte[] getQualifier(); void write(DataOutput out); void readFields(DataInput in); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString(); int compareTo(Column other);  }