StringRowKey implements RowKey { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } StringRowKey(String key); @Override byte[] toBytes(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void test() { StringRowKey srk1 = new StringRowKey("allen"); StringRowKey srk2 = new StringRowKey("danallen".substring(3)); Assert.assertEquals(srk1, srk2); Assert.assertEquals(srk1.hashCode(), srk2.hashCode()); }