Package org.roaringbitmap.longlong
Class LongConsumerRelativeRangeAdapter
- java.lang.Object
-
- org.roaringbitmap.longlong.LongConsumerRelativeRangeAdapter
-
- All Implemented Interfaces:
RelativeRangeConsumer
public class LongConsumerRelativeRangeAdapter extends java.lang.Object implements RelativeRangeConsumer
Wrapper to use a LongConsumer where a RelativeRangeConsumer is expected.
-
-
Constructor Summary
Constructors Constructor Description LongConsumerRelativeRangeAdapter(long start, LongConsumer lc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptAbsent(int relativePos)
Consume a single absent value at relativePos.void
acceptAllAbsent(int relativeFrom, int relativeTo)
Consume consecutive absent values in the range [relativeFrom, relativeTo).void
acceptAllPresent(int relativeFrom, int relativeTo)
Consume consecutive present values in the range [relativeFrom, relativeTo).void
acceptPresent(int relativePos)
Consume a single present value at relativePos.
-
-
-
Constructor Detail
-
LongConsumerRelativeRangeAdapter
public LongConsumerRelativeRangeAdapter(long start, LongConsumer lc)
-
-
Method Detail
-
acceptPresent
public void acceptPresent(int relativePos)
Description copied from interface:RelativeRangeConsumer
Consume a single present value at relativePos.- Specified by:
acceptPresent
in interfaceRelativeRangeConsumer
-
acceptAbsent
public void acceptAbsent(int relativePos)
Description copied from interface:RelativeRangeConsumer
Consume a single absent value at relativePos.- Specified by:
acceptAbsent
in interfaceRelativeRangeConsumer
-
acceptAllPresent
public void acceptAllPresent(int relativeFrom, int relativeTo)
Description copied from interface:RelativeRangeConsumer
Consume consecutive present values in the range [relativeFrom, relativeTo).- Specified by:
acceptAllPresent
in interfaceRelativeRangeConsumer
-
acceptAllAbsent
public void acceptAllAbsent(int relativeFrom, int relativeTo)
Description copied from interface:RelativeRangeConsumer
Consume consecutive absent values in the range [relativeFrom, relativeTo).- Specified by:
acceptAllAbsent
in interfaceRelativeRangeConsumer
-
-