@Test public void testEquals() { ByteArrayKeyAdapter builder = new ByteArrayKeyAdapter(); byte[] b1 = new byte[] { 1, 2 }; assertEquals(builder.toMapKey(b1), builder.toMapKey(b1)); byte[] b2 = new byte[] { 1, 2 }; assertEquals(builder.toMapKey(b2), builder.toMapKey(b1)); byte[] b3 = new byte[] { 1 }; assertNotEquals(builder.toMapKey(b3), builder.toMapKey(b1)); byte[] b4 = new byte[] {}; assertNotEquals(builder.toMapKey(b4), builder.toMapKey(b1)); }
@Override public Object toMapKey(Object rawKey) { return new ByteArrayKey((byte[]) rawKey); }
ByteArrayKeyAdapter implements KeyAdapter { @Override public Object toMapKey(Object rawKey) { return new ByteArrayKey((byte[]) rawKey); } }
ByteArrayKeyAdapter implements KeyAdapter { @Override public Object toMapKey(Object rawKey) { return new ByteArrayKey((byte[]) rawKey); }  }
ByteArrayKeyAdapter implements KeyAdapter { @Override public Object toMapKey(Object rawKey) { return new ByteArrayKey((byte[]) rawKey); }  @Override Object toMapKey(Object rawKey); @Override Object fromMapKey(Object mapKey); }
ByteArrayKeyAdapter implements KeyAdapter { @Override public Object toMapKey(Object rawKey) { return new ByteArrayKey((byte[]) rawKey); }  @Override Object toMapKey(Object rawKey); @Override Object fromMapKey(Object mapKey);  }