@Test public void testCustomRangeComparator() { RangeTable<Integer, Integer, Integer> table = ezdb.getTable("test-custom-range-comparator", IntegerSerde.get, IntegerSerde.get, IntegerSerde.get, new ComparableComparator(), new ComparableComparator() { @Override public int compare(Object o1, Object o2) { return super.compare(o1, o2) * -1; } }); table.put(1, 1, 1); table.put(1, 2, 2); table.put(1, 3, 3); TableIterator<Integer, Integer, Integer> it = table.range(1, 3); assertTrue(it.hasNext()); assertEquals(new ObjectTableRow<Integer, Integer, Integer>(1, 3, 3), it.next()); assertTrue(it.hasNext()); assertEquals(new ObjectTableRow<Integer, Integer, Integer>(1, 2, 2), it.next()); assertTrue(it.hasNext()); assertEquals(new ObjectTableRow<Integer, Integer, Integer>(1, 1, 1), it.next()); assertTrue(!it.hasNext()); it.close(); table.close(); }
@Override public <H, V> Table<H, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<V> valueSerde) { return getTable(tableName, hashKeySerde, ByteSerde.get, valueSerde); }
EzObjectTreeMapDb implements Db<Object> { @Override public <H, V> Table<H, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<V> valueSerde) { return getTable(tableName, hashKeySerde, ByteSerde.get, valueSerde); } }
EzObjectTreeMapDb implements Db<Object> { @Override public <H, V> Table<H, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<V> valueSerde) { return getTable(tableName, hashKeySerde, ByteSerde.get, valueSerde); } EzObjectTreeMapDb(); }
EzObjectTreeMapDb implements Db<Object> { @Override public <H, V> Table<H, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<V> valueSerde) { return getTable(tableName, hashKeySerde, ByteSerde.get, valueSerde); } EzObjectTreeMapDb(); @Override void deleteTable(String tableName); @Override Table<H, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<V> valueSerde); @Override RangeTable<H, R, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<R> rangeKeySerde,
			Serde<V> valueSerde); @SuppressWarnings("unchecked") @Override RangeTable<H, R, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<R> rangeKeySerde,
			Serde<V> valueSerde, Comparator<Object> hashKeyComparator, Comparator<Object> rangeKeyComparator); }
EzObjectTreeMapDb implements Db<Object> { @Override public <H, V> Table<H, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<V> valueSerde) { return getTable(tableName, hashKeySerde, ByteSerde.get, valueSerde); } EzObjectTreeMapDb(); @Override void deleteTable(String tableName); @Override Table<H, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<V> valueSerde); @Override RangeTable<H, R, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<R> rangeKeySerde,
			Serde<V> valueSerde); @SuppressWarnings("unchecked") @Override RangeTable<H, R, V> getTable(String tableName, Serde<H> hashKeySerde, Serde<R> rangeKeySerde,
			Serde<V> valueSerde, Comparator<Object> hashKeyComparator, Comparator<Object> rangeKeyComparator);  }