public interface ImmutableLongBitmapDataProvider
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
ImmutableLongBitmapDataProvider.RoaringOfLong
An internal class to help provide streams.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
contains(long x)
Checks whether the value in included, which is equivalent to checking if the corresponding bit
is set (get in BitSet class).
|
void |
forEach(LongConsumer lc)
Visit all values in the bitmap and pass them to the consumer
|
long |
getLongCardinality()
Returns the number of distinct integers added to the bitmap (e.g., number of bits set).
|
LongIterator |
getLongIterator()
For better performance, consider the Use the
forEach method. |
long |
getLongSizeInBytes()
Estimate of the memory usage of this data structure.
|
LongIterator |
getReverseLongIterator() |
int |
getSizeInBytes()
Estimate of the memory usage of this data structure.
|
boolean |
isEmpty()
Checks whether the bitmap is empty.
|
ImmutableLongBitmapDataProvider |
limit(long x)
Create a new bitmap of the same class, containing at most maxcardinality integers.
|
long |
rankLong(long x)
Rank returns the number of integers that are smaller or equal to x (Rank(infinity) would be
GetCardinality()).
|
default java.util.stream.LongStream |
reverseStream() |
long |
select(long j)
Return the jth value stored in this bitmap.
|
void |
serialize(java.io.DataOutput out)
Serialize this bitmap.
|
long |
serializedSizeInBytes()
Report the number of bytes required to serialize this bitmap.
|
default java.util.stream.LongStream |
stream() |
long[] |
toArray()
Return the set values as an array.
|
boolean contains(long x)
x - long valuelong getLongCardinality()
void forEach(LongConsumer lc)
bitmap.forEach(new LongConsumer() {
{@literal @}Override
public void accept(long value) {
// do something here
}});
}
lc - the consumerLongIterator getLongIterator()
forEach method.LongIterator getReverseLongIterator()
default java.util.stream.LongStream stream()
default java.util.stream.LongStream reverseStream()
int getSizeInBytes()
long getLongSizeInBytes()
boolean isEmpty()
ImmutableLongBitmapDataProvider limit(long x)
x - maximal cardinalitylong rankLong(long x)
x - upper limitlong select(long j)
j - index of the valuevoid serialize(java.io.DataOutput out)
throws java.io.IOException
out - the DataOutput streamjava.io.IOException - Signals that an I/O exception has occurred.long serializedSizeInBytes()
long[] toArray()