@Test public void testFollowing() { byte[] fdata = new String("data1").getBytes(); fdata[4] = (byte) 0x00; Bytes fb = Bytes.of(fdata); Assert.assertEquals(RowColumn.EMPTY, new RowColumn().following()); Assert.assertEquals(new RowColumn(fb), new RowColumn("data").following()); Assert.assertEquals(new RowColumn("row", new Column(fb)), new RowColumn("row", new Column("data")).following()); Assert.assertEquals(new RowColumn("row", new Column(Bytes.of("cf"), fb)), new RowColumn("row", new Column("cf", "data")).following()); Assert.assertEquals(new RowColumn("row", new Column(Bytes.of("cf"), Bytes.of("cq"), fb)), new RowColumn("row", new Column("cf", "cq", "data")).following()); }
public RowColumn following() { if (row.equals(Bytes.EMPTY)) { return RowColumn.EMPTY; } else if (col.equals(Column.EMPTY)) { return new RowColumn(followingBytes(row)); } else if (!col.isQualifierSet()) { return new RowColumn(row, new Column(followingBytes(col.getFamily()))); } else if (!col.isVisibilitySet()) { return new RowColumn(row, new Column(col.getFamily(), followingBytes(col.getQualifier()))); } else { return new RowColumn(row, new Column(col.getFamily(), col.getQualifier(), followingBytes(col.getVisibility()))); } }
RowColumn implements Comparable<RowColumn>, Serializable { public RowColumn following() { if (row.equals(Bytes.EMPTY)) { return RowColumn.EMPTY; } else if (col.equals(Column.EMPTY)) { return new RowColumn(followingBytes(row)); } else if (!col.isQualifierSet()) { return new RowColumn(row, new Column(followingBytes(col.getFamily()))); } else if (!col.isVisibilitySet()) { return new RowColumn(row, new Column(col.getFamily(), followingBytes(col.getQualifier()))); } else { return new RowColumn(row, new Column(col.getFamily(), col.getQualifier(), followingBytes(col.getVisibility()))); } } }
RowColumn implements Comparable<RowColumn>, Serializable { public RowColumn following() { if (row.equals(Bytes.EMPTY)) { return RowColumn.EMPTY; } else if (col.equals(Column.EMPTY)) { return new RowColumn(followingBytes(row)); } else if (!col.isQualifierSet()) { return new RowColumn(row, new Column(followingBytes(col.getFamily()))); } else if (!col.isVisibilitySet()) { return new RowColumn(row, new Column(col.getFamily(), followingBytes(col.getQualifier()))); } else { return new RowColumn(row, new Column(col.getFamily(), col.getQualifier(), followingBytes(col.getVisibility()))); } } RowColumn();  RowColumn(Bytes row);  RowColumn(CharSequence row);  RowColumn(Bytes row, Column col);  RowColumn(CharSequence row, Column col); }
RowColumn implements Comparable<RowColumn>, Serializable { public RowColumn following() { if (row.equals(Bytes.EMPTY)) { return RowColumn.EMPTY; } else if (col.equals(Column.EMPTY)) { return new RowColumn(followingBytes(row)); } else if (!col.isQualifierSet()) { return new RowColumn(row, new Column(followingBytes(col.getFamily()))); } else if (!col.isVisibilitySet()) { return new RowColumn(row, new Column(col.getFamily(), followingBytes(col.getQualifier()))); } else { return new RowColumn(row, new Column(col.getFamily(), col.getQualifier(), followingBytes(col.getVisibility()))); } } RowColumn();  RowColumn(Bytes row);  RowColumn(CharSequence row);  RowColumn(Bytes row, Column col);  RowColumn(CharSequence row, Column col); Bytes getRow(); String getsRow(); Column getColumn(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); RowColumn following(); @Override int compareTo(RowColumn other); }
RowColumn implements Comparable<RowColumn>, Serializable { public RowColumn following() { if (row.equals(Bytes.EMPTY)) { return RowColumn.EMPTY; } else if (col.equals(Column.EMPTY)) { return new RowColumn(followingBytes(row)); } else if (!col.isQualifierSet()) { return new RowColumn(row, new Column(followingBytes(col.getFamily()))); } else if (!col.isVisibilitySet()) { return new RowColumn(row, new Column(col.getFamily(), followingBytes(col.getQualifier()))); } else { return new RowColumn(row, new Column(col.getFamily(), col.getQualifier(), followingBytes(col.getVisibility()))); } } RowColumn();  RowColumn(Bytes row);  RowColumn(CharSequence row);  RowColumn(Bytes row, Column col);  RowColumn(CharSequence row, Column col); Bytes getRow(); String getsRow(); Column getColumn(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); RowColumn following(); @Override int compareTo(RowColumn other); static final RowColumn EMPTY; }