public interface ImmutableLongBitmapDataProvider
Modifier and Type | Method and Description |
---|---|
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()).
|
long |
select(long j)
Return the jth value stored in this bitmap.
|
void |
serialize(DataOutput out)
Serialize this bitmap.
|
long |
serializedSizeInBytes()
Report the number of bytes required to serialize this bitmap.
|
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()
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(DataOutput out) throws IOException
out
- the DataOutput streamIOException
- Signals that an I/O exception has occurred.long serializedSizeInBytes()
long[] toArray()
Copyright © 2018. All rights reserved.