@Test public void testCompare() { Assert.assertEquals(0, rcv1.compareTo(rcv1)); Assert.assertEquals(0, rcv1.compareTo(rcv2)); Assert.assertTrue(rcv1.compareTo(rcv3) < 0); Assert.assertTrue(rcv3.compareTo(rcv1) > 0); Assert.assertTrue(rcv1.compareTo(rcv3) < 0); Assert.assertTrue(rcv3.compareTo(rcv1) > 0); Assert.assertTrue(rcv1.compareTo(rcv5) < 0); Assert.assertTrue(rcv5.compareTo(rcv1) > 0); Assert.assertTrue(rcv1.compareTo(rcv4) < 0); Assert.assertTrue(rcv4.compareTo(rcv1) > 0); List<RowColumnValue> l1 = Arrays.asList(rcv7, rcv6, rcv5, rcv4, rcv3, rcv2, rcv1); Collections.shuffle(l1); Collections.sort(l1); List<RowColumnValue> l2 = Arrays.asList(rcv1, rcv2, rcv4, rcv5, rcv3, rcv6, rcv7); Assert.assertEquals(l2, l1); }
@Override public int compareTo(RowColumnValue o) { if (this == o) { return 0; } int result = row.compareTo(o.row); if (result == 0) { result = col.compareTo(o.col); if (result == 0) { result = val.compareTo(o.val); } } return result; }
RowColumnValue implements Comparable<RowColumnValue>, Serializable { @Override public int compareTo(RowColumnValue o) { if (this == o) { return 0; } int result = row.compareTo(o.row); if (result == 0) { result = col.compareTo(o.col); if (result == 0) { result = val.compareTo(o.val); } } return result; } }
RowColumnValue implements Comparable<RowColumnValue>, Serializable { @Override public int compareTo(RowColumnValue o) { if (this == o) { return 0; } int result = row.compareTo(o.row); if (result == 0) { result = col.compareTo(o.col); if (result == 0) { result = val.compareTo(o.val); } } return result; } RowColumnValue(Bytes row, Column col, Bytes val);  RowColumnValue(CharSequence row, Column col, CharSequence val); }
RowColumnValue implements Comparable<RowColumnValue>, Serializable { @Override public int compareTo(RowColumnValue o) { if (this == o) { return 0; } int result = row.compareTo(o.row); if (result == 0) { result = col.compareTo(o.col); if (result == 0) { result = val.compareTo(o.val); } } return result; } RowColumnValue(Bytes row, Column col, Bytes val);  RowColumnValue(CharSequence row, Column col, CharSequence val); Bytes getRow(); String getsRow(); Column getColumn(); Bytes getValue(); String getsValue(); RowColumn getRowColumn(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override int compareTo(RowColumnValue o); }
RowColumnValue implements Comparable<RowColumnValue>, Serializable { @Override public int compareTo(RowColumnValue o) { if (this == o) { return 0; } int result = row.compareTo(o.row); if (result == 0) { result = col.compareTo(o.col); if (result == 0) { result = val.compareTo(o.val); } } return result; } RowColumnValue(Bytes row, Column col, Bytes val);  RowColumnValue(CharSequence row, Column col, CharSequence val); Bytes getRow(); String getsRow(); Column getColumn(); Bytes getValue(); String getsValue(); RowColumn getRowColumn(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override int compareTo(RowColumnValue o);  }