public final class MappeableBitmapContainer extends MappeableContainer implements java.lang.Cloneable
| 限定符和类型 | 字段和说明 |
|---|---|
protected static int |
MAX_CAPACITY |
ContainerNames| 构造器和说明 |
|---|
MappeableBitmapContainer()
Create a bitmap container with all bits set to false
|
MappeableBitmapContainer(BitmapContainer bc)
Creates a new bitmap container from a non-mappeable one.
|
MappeableBitmapContainer(int firstOfRun,
int lastOfRun)
Create a bitmap container with a run of ones from firstOfRun to lastOfRun, inclusive caller
must ensure that the range isn't so small that an ArrayContainer should have been created
instead
|
MappeableBitmapContainer(java.nio.LongBuffer array,
int initCardinality)
Construct a new BitmapContainer backed by the provided LongBuffer.
|
| 限定符和类型 | 方法和说明 |
|---|---|
MappeableContainer |
add(char i)
Add a char to the container.
|
MappeableContainer |
add(int begin,
int end)
Return a new container with all chars in [begin,end) added using an unsigned interpretation.
|
MappeableArrayContainer |
and(MappeableArrayContainer value2)
Computes the bitwise AND of this container with another (intersection).
|
MappeableContainer |
and(MappeableBitmapContainer value2)
Computes the bitwise AND of this container with another (intersection).
|
MappeableContainer |
and(MappeableRunContainer value2)
Computes the bitwise AND of this container with another (intersection).
|
int |
andCardinality(MappeableArrayContainer value2) |
int |
andCardinality(MappeableBitmapContainer value2) |
int |
andCardinality(MappeableRunContainer x) |
void |
andInto(long[] bits)
Computes the intersection of this container with the bits present in the array,
modifying the array.
|
MappeableContainer |
andNot(MappeableArrayContainer value2)
Computes the bitwise ANDNOT of this container with another (difference).
|
MappeableContainer |
andNot(MappeableBitmapContainer value2)
Computes the bitwise ANDNOT of this container with another (difference).
|
MappeableContainer |
andNot(MappeableRunContainer value2)
Computes the bitwise ANDNOT of this container with another (difference).
|
void |
clear()
Empties the container
|
MappeableBitmapContainer |
clone() |
static boolean |
contains(java.nio.ByteBuffer buf,
int position,
char i)
Checks whether the container contains the value i.
|
boolean |
contains(char i)
Checks whether the contain contains the provided value
|
boolean |
contains(int minimum,
int supremum)
Checks whether the container contains the entire range
|
protected boolean |
contains(MappeableArrayContainer arrayContainer) |
protected boolean |
contains(MappeableBitmapContainer bitmapContainer) |
protected boolean |
contains(MappeableRunContainer runContainer) |
boolean |
equals(java.lang.Object o) |
void |
fillLeastSignificant16bits(int[] x,
int i,
int mask)
Fill the least significant 16 bits of the integer array, starting at index index, with the
char values from this container.
|
int |
first()
Get the first integer held in the container
|
MappeableContainer |
flip(char i)
Add a char to the container if it is not present, otherwise remove it.
|
void |
forEach(char msb,
IntConsumer ic)
Iterate through the values of this container and pass them
along to the IntConsumer, using msb as the 16 most significant bits.
|
protected int |
getArraySizeInBytes()
Size of the underlying array
|
ContainerBatchIterator |
getBatchIterator()
Gets an iterator to visit the contents of the container in batches
|
int |
getCardinality()
Computes the distinct number of char values in the container.
|
PeekableCharIterator |
getCharIterator()
Iterator to visit the char values in the container in ascending order.
|
CharIterator |
getReverseCharIterator()
Iterator to visit the char values in the container in descending order.
|
int |
getSizeInBytes()
Computes an estimate of the memory usage of this container.
|
int |
hashCode() |
MappeableContainer |
iadd(int begin,
int end)
Add all chars in [begin,end) using an unsigned interpretation.
|
MappeableContainer |
iand(MappeableArrayContainer b2)
Computes the in-place bitwise AND of this container with another (intersection).
|
MappeableContainer |
iand(MappeableBitmapContainer b2)
Computes the in-place bitwise AND of this container with another (intersection).
|
MappeableContainer |
iand(MappeableRunContainer x)
Computes the in-place bitwise AND of this container with another (intersection).
|
MappeableContainer |
iandNot(MappeableArrayContainer b2)
Computes the in-place bitwise ANDNOT of this container with another (difference).
|
MappeableContainer |
iandNot(MappeableBitmapContainer b2)
Computes the in-place bitwise ANDNOT of this container with another (difference).
|
MappeableContainer |
iandNot(MappeableRunContainer x)
Computes the in-place bitwise ANDNOT of this container with another (difference).
|
MappeableContainer |
inot(int firstOfRange,
int lastOfRange)
Computes the in-place bitwise NOT of this container (complement).
|
boolean |
intersects(int minimum,
int supremum)
Checks if the container intersects with a range
|
boolean |
intersects(MappeableArrayContainer value2)
Returns true if the current container intersects the other container.
|
boolean |
intersects(MappeableBitmapContainer value2)
Returns true if the current container intersects the other container.
|
boolean |
intersects(MappeableRunContainer x)
Returns true if the current container intersects the other container.
|
MappeableBitmapContainer |
ior(MappeableArrayContainer value2)
Computes the in-place bitwise OR of this container with another (union).
|
MappeableContainer |
ior(MappeableBitmapContainer b2)
Computes the in-place bitwise OR of this container with another (union).
|
MappeableContainer |
ior(MappeableRunContainer x)
Computes the in-place bitwise OR of this container with another (union).
|
MappeableContainer |
iremove(int begin,
int end)
Remove chars in [begin,end) using an unsigned interpretation.
|
protected boolean |
isArrayBacked() |
boolean |
isEmpty()
Checks whether the container is empty or not.
|
boolean |
isFull()
Checks whether the container is full or not.
|
java.util.Iterator<java.lang.Character> |
iterator() |
MappeableContainer |
ixor(MappeableArrayContainer value2)
Computes the in-place bitwise XOR of this container with another (symmetric difference).
|
MappeableContainer |
ixor(MappeableBitmapContainer b2)
Computes the in-place bitwise XOR of this container with another (symmetric difference).
|
MappeableContainer |
ixor(MappeableRunContainer x)
Computes the in-place bitwise XOR of this container with another (symmetric difference).
|
int |
last()
Get the last integer held in the container
|
protected MappeableContainer |
lazyor(MappeableArrayContainer value2) |
protected MappeableContainer |
lazyor(MappeableBitmapContainer x) |
protected MappeableContainer |
lazyor(MappeableRunContainer x) |
MappeableContainer |
limit(int maxcardinality)
Create a new MappeableContainer containing at most maxcardinality integers.
|
int |
nextAbsentValue(char fromValue)
Gets the first absent value greater than or equal to the lower bound.
|
int |
nextSetBit(int i)
Find the index of the next set bit greater or equal to i, returns -1 if none found.
|
int |
nextValue(char fromValue)
Gets the first value greater than or equal to the lower bound, or -1 if no such value exists.
|
MappeableContainer |
not(int firstOfRange,
int lastOfRange)
Computes the bitwise NOT of this container (complement).
|
MappeableContainer |
or(MappeableArrayContainer value2)
Computes the bitwise OR of this container with another (union).
|
MappeableContainer |
or(MappeableBitmapContainer value2)
Computes the bitwise OR of this container with another (union).
|
MappeableContainer |
or(MappeableRunContainer value2)
Computes the bitwise OR of this container with another (union).
|
void |
orInto(long[] bits)
Computes the union of this container with the bits present in the array,
modifying the array.
|
int |
previousAbsentValue(char fromValue)
Gets the last value less than or equal to the upper bound.
|
int |
previousValue(char fromValue)
Gets the last value less than or equal to the upper bound, or -1 if no such value exists.
|
int |
rank(char lowbits)
Rank returns the number of integers that are smaller or equal to x (Rank(infinity) would be
GetCardinality()).
|
void |
readExternal(java.io.ObjectInput in) |
MappeableContainer |
remove(char i)
Remove the char from this container.
|
MappeableContainer |
remove(int begin,
int end)
Return a new container with all chars in [begin,end) remove using an unsigned interpretation.
|
MappeableContainer |
repairAfterLazy()
The output of a lazyOR or lazyIOR might be an invalid container, this should be called on it.
|
MappeableContainer |
runOptimize()
Convert to MappeableRunContainers, when the result is smaller.
|
char |
select(int j)
Return the jth value
|
int |
serializedSizeInBytes()
Report the number of bytes required to serialize this container.
|
protected static int |
serializedSizeInBytes(int unusedCardinality) |
MappeableBitmapContainer |
toBitmapContainer()
Convert the current container to a BitmapContainer, if a conversion is needed.
|
Container |
toContainer()
Convert to a non-mappeable container.
|
long[] |
toLongArray()
Create a copy of the content of this container as a long array.
|
java.lang.String |
toString() |
void |
trim()
If possible, recover wasted memory.
|
protected void |
writeArray(java.nio.ByteBuffer buffer)
Write just the underlying array.
|
protected void |
writeArray(java.io.DataOutput out)
Write just the underlying array.
|
void |
writeExternal(java.io.ObjectOutput out) |
MappeableContainer |
xor(MappeableArrayContainer value2)
Computes the bitwise XOR of this container with another (symmetric difference).
|
MappeableContainer |
xor(MappeableBitmapContainer value2)
Computes the bitwise XOR of this container with another (symmetric difference).
|
MappeableContainer |
xor(MappeableRunContainer value2)
Computes the bitwise XOR of this container with another (symmetric difference).
|
and, andCardinality, andNot, assertNonEmpty, contains, getContainerName, iand, iandNot, intersects, ior, iorNot, ixor, lazyIOR, lazyOR, or, orNot, rangeOfOnes, xor, xorCardinalityprotected static final int MAX_CAPACITY
public MappeableBitmapContainer()
public MappeableBitmapContainer(BitmapContainer bc)
bc - the original containerpublic MappeableBitmapContainer(int firstOfRun,
int lastOfRun)
firstOfRun - first indexlastOfRun - last index (range is exclusive)public MappeableBitmapContainer(java.nio.LongBuffer array,
int initCardinality)
array - LongBuffer where the data is storedinitCardinality - cardinality (number of values stored)protected static int serializedSizeInBytes(int unusedCardinality)
public MappeableContainer add(int begin, int end)
MappeableContaineradd 在类中 MappeableContainerbegin - start of range (inclusive)end - end of range (exclusive)public MappeableContainer add(char i)
MappeableContaineradd 在接口中 WordStorage<MappeableContainer>add 在类中 MappeableContaineri - char to be addedpublic boolean isEmpty()
MappeableContainerisEmpty 在接口中 WordStorage<MappeableContainer>isEmpty 在类中 MappeableContainerpublic MappeableArrayContainer and(MappeableArrayContainer value2)
MappeableContainerand 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer and(MappeableBitmapContainer value2)
MappeableContainerand 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer and(MappeableRunContainer value2)
MappeableContainerand 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer andNot(MappeableArrayContainer value2)
MappeableContainerandNot 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer andNot(MappeableBitmapContainer value2)
MappeableContainerandNot 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer andNot(MappeableRunContainer value2)
MappeableContainerandNot 在类中 MappeableContainervalue2 - other containerpublic void clear()
MappeableContainerclear 在类中 MappeableContainerpublic MappeableBitmapContainer clone()
clone 在类中 MappeableContainerpublic boolean contains(char i)
MappeableContainercontains 在类中 MappeableContaineri - value to checkpublic static boolean contains(java.nio.ByteBuffer buf,
int position,
char i)
buf - underlying bufferposition - position of the container in the bufferi - indexpublic boolean equals(java.lang.Object o)
equals 在类中 java.lang.Objectpublic void fillLeastSignificant16bits(int[] x,
int i,
int mask)
MappeableContainerfillLeastSignificant16bits 在类中 MappeableContainerx - provided arrayi - starting indexmask - indicates most significant bitspublic MappeableContainer flip(char i)
MappeableContainerflip 在类中 MappeableContaineri - char to be addedprotected int getArraySizeInBytes()
MappeableContainergetArraySizeInBytes 在类中 MappeableContainerpublic int getCardinality()
MappeableContainergetCardinality 在类中 MappeableContainerpublic CharIterator getReverseCharIterator()
MappeableContainergetReverseCharIterator 在类中 MappeableContainerpublic PeekableCharIterator getCharIterator()
MappeableContainergetCharIterator 在类中 MappeableContainerpublic ContainerBatchIterator getBatchIterator()
MappeableContainergetBatchIterator 在类中 MappeableContainerpublic int getSizeInBytes()
MappeableContainergetSizeInBytes 在类中 MappeableContainerpublic int hashCode()
hashCode 在类中 java.lang.Objectpublic MappeableContainer iadd(int begin, int end)
MappeableContaineriadd 在类中 MappeableContainerbegin - start of range (inclusive)end - end of range (exclusive)public MappeableContainer iand(MappeableArrayContainer b2)
MappeableContaineriand 在类中 MappeableContainerb2 - other containerpublic MappeableContainer iand(MappeableBitmapContainer b2)
MappeableContaineriand 在类中 MappeableContainerb2 - other containerpublic MappeableContainer iand(MappeableRunContainer x)
MappeableContaineriand 在类中 MappeableContainerx - other containerpublic MappeableContainer iandNot(MappeableArrayContainer b2)
MappeableContaineriandNot 在类中 MappeableContainerb2 - other containerpublic MappeableContainer iandNot(MappeableBitmapContainer b2)
MappeableContaineriandNot 在类中 MappeableContainerb2 - other containerpublic MappeableContainer iandNot(MappeableRunContainer x)
MappeableContaineriandNot 在类中 MappeableContainerx - other containerpublic MappeableContainer inot(int firstOfRange, int lastOfRange)
MappeableContainerinot 在类中 MappeableContainerfirstOfRange - beginning of range (inclusive); 0 is beginning of this container.lastOfRange - ending of range (exclusive)public boolean intersects(MappeableArrayContainer value2)
MappeableContainerintersects 在类中 MappeableContainervalue2 - other containerpublic boolean intersects(MappeableBitmapContainer value2)
MappeableContainerintersects 在类中 MappeableContainervalue2 - other containerpublic boolean intersects(MappeableRunContainer x)
MappeableContainerintersects 在类中 MappeableContainerx - other containerpublic MappeableBitmapContainer ior(MappeableArrayContainer value2)
MappeableContainerior 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer ior(MappeableBitmapContainer b2)
MappeableContainerior 在类中 MappeableContainerb2 - other containerpublic boolean isFull()
MappeableContainerisFull 在类中 MappeableContainerpublic void orInto(long[] bits)
MappeableContainerorInto 在类中 MappeableContainerbits - a 1024 element array to be interpreted as a bit setpublic void andInto(long[] bits)
MappeableContainerandInto 在类中 MappeableContainerbits - a 1024 element array to be interpreted as a bit setpublic MappeableContainer ior(MappeableRunContainer x)
MappeableContainerior 在类中 MappeableContainerx - other containerpublic MappeableContainer iremove(int begin, int end)
MappeableContaineriremove 在类中 MappeableContainerbegin - start of range (inclusive)end - end of range (exclusive)protected boolean isArrayBacked()
isArrayBacked 在类中 MappeableContainerpublic java.util.Iterator<java.lang.Character> iterator()
iterator 在接口中 java.lang.Iterable<java.lang.Character>public MappeableContainer ixor(MappeableArrayContainer value2)
MappeableContainerixor 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer ixor(MappeableBitmapContainer b2)
MappeableContainerixor 在类中 MappeableContainerb2 - other containerpublic MappeableContainer ixor(MappeableRunContainer x)
MappeableContainerixor 在类中 MappeableContainerx - other containerprotected MappeableContainer lazyor(MappeableArrayContainer value2)
protected MappeableContainer lazyor(MappeableBitmapContainer x)
protected MappeableContainer lazyor(MappeableRunContainer x)
public MappeableContainer limit(int maxcardinality)
MappeableContainerlimit 在类中 MappeableContainermaxcardinality - maximal cardinalitypublic int nextSetBit(int i)
i - starting indexpublic MappeableContainer not(int firstOfRange, int lastOfRange)
MappeableContainernot 在类中 MappeableContainerfirstOfRange - beginning of range (inclusive); 0 is beginning of this container.lastOfRange - ending of range (exclusive)public MappeableContainer or(MappeableArrayContainer value2)
MappeableContaineror 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer or(MappeableBitmapContainer value2)
MappeableContaineror 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer or(MappeableRunContainer value2)
MappeableContaineror 在类中 MappeableContainervalue2 - other containerpublic int rank(char lowbits)
MappeableContainerrank 在类中 MappeableContainerlowbits - upper limitpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException
readExternal 在接口中 java.io.Externalizablejava.io.IOExceptionpublic MappeableContainer remove(int begin, int end)
MappeableContainerremove 在类中 MappeableContainerbegin - start of range (inclusive)end - end of range (exclusive)public MappeableContainer remove(char i)
MappeableContainerremove 在类中 MappeableContaineri - to be removedpublic MappeableContainer repairAfterLazy()
MappeableContainerrepairAfterLazy 在类中 MappeableContainerpublic MappeableContainer runOptimize()
MappeableContainerrunOptimize 在接口中 WordStorage<MappeableContainer>runOptimize 在类中 MappeableContainerpublic char select(int j)
MappeableContainerselect 在类中 MappeableContainerj - index of the valuepublic int serializedSizeInBytes()
MappeableContainerserializedSizeInBytes 在类中 MappeableContainerpublic Container toContainer()
MappeableContainertoContainer 在类中 MappeableContainerpublic long[] toLongArray()
public java.lang.String toString()
toString 在类中 java.lang.Objectpublic void trim()
MappeableContainertrim 在类中 MappeableContainerprotected void writeArray(java.io.DataOutput out)
throws java.io.IOException
MappeableContainerwriteArray 在类中 MappeableContainerout - output streamjava.io.IOException - in case of failureprotected void writeArray(java.nio.ByteBuffer buffer)
MappeableContainerwriteArray 在类中 MappeableContainerbuffer - the buffer to write topublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal 在接口中 java.io.Externalizablejava.io.IOExceptionpublic MappeableContainer xor(MappeableArrayContainer value2)
MappeableContainerxor 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer xor(MappeableBitmapContainer value2)
MappeableContainerxor 在类中 MappeableContainervalue2 - other containerpublic MappeableContainer xor(MappeableRunContainer value2)
MappeableContainerxor 在类中 MappeableContainervalue2 - other parameterpublic void forEach(char msb,
IntConsumer ic)
MappeableContainerforEach 在类中 MappeableContainermsb - 16 most significant bitsic - consumerpublic int andCardinality(MappeableArrayContainer value2)
andCardinality 在类中 MappeableContainerpublic int andCardinality(MappeableBitmapContainer value2)
andCardinality 在类中 MappeableContainerpublic int andCardinality(MappeableRunContainer x)
andCardinality 在类中 MappeableContainerpublic MappeableBitmapContainer toBitmapContainer()
MappeableContainertoBitmapContainer 在类中 MappeableContainerpublic int first()
MappeableContainerfirst 在类中 MappeableContainerpublic int last()
MappeableContainerlast 在类中 MappeableContainerpublic int nextValue(char fromValue)
MappeableContainernextValue 在类中 MappeableContainerfromValue - the lower bound (inclusive)public int previousValue(char fromValue)
MappeableContainerpreviousValue 在类中 MappeableContainerfromValue - the upper bound (inclusive)public int nextAbsentValue(char fromValue)
MappeableContainernextAbsentValue 在类中 MappeableContainerfromValue - the lower bound (inclusive)public int previousAbsentValue(char fromValue)
MappeableContainerpreviousAbsentValue 在类中 MappeableContainerfromValue - the upper bound (inclusive)protected boolean contains(MappeableBitmapContainer bitmapContainer)
contains 在类中 MappeableContainerpublic boolean intersects(int minimum,
int supremum)
MappeableContainerintersects 在类中 MappeableContainerminimum - the inclusive unsigned lower bound of the rangesupremum - the exclusive unsigned upper bound of the rangepublic boolean contains(int minimum,
int supremum)
MappeableContainercontains 在类中 MappeableContainerminimum - the inclusive lower bound of the rangesupremum - the exclusive upper bound of the rangeprotected boolean contains(MappeableRunContainer runContainer)
contains 在类中 MappeableContainerprotected boolean contains(MappeableArrayContainer arrayContainer)
contains 在类中 MappeableContainer