Column implements Comparable<Column>, Serializable { @Override public int compareTo(Column other) { if (this == other) { return 0; } int result = family.compareTo(other.family); if (result == 0) { result = qualifier.compareTo(other.qualifier); if (result == 0) { result = visibility.compareTo(other.visibility); } } return result; } Column();  Column(Bytes family);  Column(CharSequence family);  Column(Bytes family, Bytes qualifier);  Column(CharSequence family, CharSequence qualifier);  Column(Bytes family, Bytes qualifier, Bytes visibility);  Column(CharSequence family, CharSequence qualifier, CharSequence visibility); boolean isFamilySet(); Bytes getFamily(); String getsFamily(); boolean isQualifierSet(); Bytes getQualifier(); String getsQualifier(); boolean isVisibilitySet(); Bytes getVisibility(); String getsVisibility(); @Override String toString(); @Override int hashCode(); @Override int compareTo(Column other); @Override boolean equals(Object o); static final Column EMPTY; }
@Test public void testCompare() { Column c1 = new Column("a", "b"); Column c2 = new Column("a", "c"); Column c3 = new Column("a", "b", "d"); Column c4 = new Column("a"); Column c5 = Column.EMPTY; Column c6 = new Column("a", "b"); Assert.assertEquals(-1, c1.compareTo(c2)); Assert.assertEquals(1, c2.compareTo(c1)); Assert.assertEquals(0, c1.compareTo(c6)); Assert.assertEquals(1, c1.compareTo(c5)); Assert.assertEquals(-1, c4.compareTo(c1)); Assert.assertEquals(-1, c1.compareTo(c3)); Assert.assertEquals(1, c4.compareTo(c5)); Assert.assertEquals(-1, c3.compareTo(c2)); }