@Test public void testEncodedLength() { PositionedByteRange buff = new SimplePositionedByteRange(20); for (DataType<String> type : new OrderedString[] { OrderedString.ASCENDING, OrderedString.DESCENDING }) { for (String val : VALUES) { buff.setPosition(0); type.encode(buff, val); assertEquals( "encodedLength does not match actual, " + val, buff.getPosition(), type.encodedLength(val)); } } }
@Override public int encodedLength(String val) { return null == val ? 1 : val.getBytes(OrderedBytes.UTF8).length + 2; }
OrderedString extends OrderedBytesBase<String> { @Override public int encodedLength(String val) { return null == val ? 1 : val.getBytes(OrderedBytes.UTF8).length + 2; } }
OrderedString extends OrderedBytesBase<String> { @Override public int encodedLength(String val) { return null == val ? 1 : val.getBytes(OrderedBytes.UTF8).length + 2; } protected  OrderedString(Order order); }
OrderedString extends OrderedBytesBase<String> { @Override public int encodedLength(String val) { return null == val ? 1 : val.getBytes(OrderedBytes.UTF8).length + 2; } protected  OrderedString(Order order); @Override int encodedLength(String val); @Override Class<String> encodedClass(); @Override String decode(PositionedByteRange src); @Override int encode(PositionedByteRange dst, String val); }
OrderedString extends OrderedBytesBase<String> { @Override public int encodedLength(String val) { return null == val ? 1 : val.getBytes(OrderedBytes.UTF8).length + 2; } protected  OrderedString(Order order); @Override int encodedLength(String val); @Override Class<String> encodedClass(); @Override String decode(PositionedByteRange src); @Override int encode(PositionedByteRange dst, String val); static final OrderedString ASCENDING; static final OrderedString DESCENDING; }