SplitMap { public boolean contains(int value) { Container mask = index.get(involution.invert((short)(value >>> 16))); return null != mask && mask.contains((short) value); } SplitMap(PrefixIndex<Container> index, KeyInvolution involution);  SplitMap(PrefixIndex<Container> index);  SplitMap(KeyInvolution involution); void insert(short key, Container region); boolean contains(int value); long getCardinality(); boolean isEmpty(); Stream<PrefixIndex<Container>> stream();  }
@Test public void testWriteToSplitMap() { SplitMapPageWriter writer = new SplitMapPageWriter(); writer.add(1); writer.add(11); writer.add(1 << 16 | 1); SplitMap splitMap = writer.toSplitMap(); assertTrue(splitMap.contains(1)); assertTrue(splitMap.contains(11)); assertTrue(splitMap.contains(1 << 16 | 1)); }
@Test public void testWriteToSplitMapWithPermutationHash() { SplitMapPageWriter writer = new SplitMapPageWriter(Involutions::reverse); writer.add(1); writer.add(11); writer.add(1 << 16 | 1); SplitMap splitMap = writer.toSplitMap(); assertTrue(splitMap.contains(1)); assertTrue(splitMap.contains(11)); assertTrue(splitMap.contains(1 << 16 | 1)); }