BitSetIndexToIndexMultiMap implements IndexToIndexMultiMap { @Override public boolean getFrom( @NotNull final BitSet dest, final int fromInclusive) { assert 0 <= fromInclusive && fromInclusive < keysCount; boolean result = false; long current = fromInclusive * bitSetSizeInBytes; final long remaining = elements.remaining(); assert remaining <= Integer.MAX_VALUE; while (current < remaining) { result |= dest.or(elements, current, bitSetSizeInLongs); current += bitSetSizeInBytes; } return result; } private  BitSetIndexToIndexMultiMap(
            final int keysCount,
            @NotNull
            final Buffer elements,
            final int bitSetSizeInLongs); @NotNull static BitSetIndexToIndexMultiMap from(
            @NotNull
            final Buffer buf); @Override boolean get(
            @NotNull
            final BitSet dest,
            final int key); @Override boolean getFrom(
            @NotNull
            final BitSet dest,
            final int fromInclusive); @Override boolean getTo(
            @NotNull
            final BitSet dest,
            final int toExclusive); @Override boolean getBetween(
            @NotNull
            final BitSet dest,
            final int fromInclusive,
            final int toExclusive); @Override int getKeysCount(); @Override String toString(); @NotNull @Override Iterator<IntToIntArray> ascending(
            @NotNull
            final BitSet valueFilter); @NotNull @Override Iterator<IntToIntArray> descending(
            @NotNull
            final BitSet valueFilter);  }
@Test public void getFrom() throws IOException { final IndexToIndexMultiMap index = build(); final BitSet dest = LongArrayBitSet.zero(DOCS); index.getFrom(dest, DOCS / 4); assertEquals(DOCS / 2, dest.cardinality()); for (int i = DOCS / 2; i < DOCS; i++) assertTrue(dest.get(i)); }