public abstract class Container extends Object implements Iterable<Short>, Cloneable, Externalizable
| Constructor and Description |
|---|
Container() |
| Modifier and Type | Method and Description |
|---|---|
abstract Container |
add(short x)
Add a short to the container.
|
abstract Container |
and(ArrayContainer x)
Computes the bitwise AND of this container with another
(intersection).
|
abstract Container |
and(BitmapContainer x)
Computes the bitwise AND of this container with another
(intersection).
|
Container |
and(Container x)
Computes the bitwise AND of this container with another
(intersection).
|
abstract Container |
andNot(ArrayContainer x)
Computes the bitwise ANDNOT of this container with another
(difference).
|
abstract Container |
andNot(BitmapContainer x)
Computes the bitwise ANDNOT of this container with another
(difference).
|
Container |
andNot(Container x)
Computes the bitwise ANDNOT of this container with another
(difference).
|
abstract void |
clear()
Empties the container
|
abstract Container |
clone() |
abstract boolean |
contains(short x)
Checks whether the contain contains the provided value
|
abstract void |
deserialize(DataInput in)
Deserialize (recover) the container.
|
abstract void |
fillLeastSignificant16bits(int[] x,
int i,
int mask)
Fill the least significant 16 bits of the integer array, starting at
index index, with the short values from this container.
|
protected abstract int |
getArraySizeInBytes()
Size of the underlying array
|
abstract int |
getCardinality()
Computes the distinct number of short values in the container.
|
abstract ShortIterator |
getShortIterator()
Iterator to visit the short values in the container
|
abstract int |
getSizeInBytes()
Computes an estimate of the memory usage of this container.
|
abstract Container |
iand(ArrayContainer x)
Computes the in-place bitwise AND of this container with another
(intersection).
|
abstract Container |
iand(BitmapContainer x)
Computes the in-place bitwise AND of this container with another
(intersection).
|
Container |
iand(Container x)
Computes the in-place bitwise AND of this container with another
(intersection).
|
abstract Container |
iandNot(ArrayContainer x)
Computes the in-place bitwise ANDNOT of this container with another
(difference).
|
abstract Container |
iandNot(BitmapContainer x)
Computes the in-place bitwise ANDNOT of this container with another
(difference).
|
Container |
iandNot(Container x)
Computes the in-place bitwise ANDNOT of this container with another
(difference).
|
abstract Container |
inot(int rangeStart,
int rangeEnd)
Computes the in-place bitwise NOT of this container (complement).
|
abstract Container |
ior(ArrayContainer x)
Computes the in-place bitwise OR of this container with another
(union).
|
abstract Container |
ior(BitmapContainer x)
Computes the in-place bitwise OR of this container with another
(union).
|
Container |
ior(Container x)
Computes the in-place bitwise OR of this container with another
(union).
|
abstract Container |
ixor(ArrayContainer x)
Computes the in-place bitwise OR of this container with another
(union).
|
abstract Container |
ixor(BitmapContainer x)
Computes the in-place bitwise OR of this container with another
(union).
|
Container |
ixor(Container x)
Computes the in-place bitwise OR of this container with another
(union).
|
protected Container |
lazyIOR(Container x) |
protected Container |
lazyOR(Container x) |
abstract Container |
limit(int maxcardinality)
Create a new Container containing at most maxcardinality integers.
|
abstract Container |
not(int rangeStart,
int rangeEnd)
Computes the bitwise NOT of this container (complement).
|
abstract Container |
or(ArrayContainer x)
Computes the bitwise OR of this container with another (union).
|
abstract Container |
or(BitmapContainer x)
Computes the bitwise OR of this container with another (union).
|
Container |
or(Container x)
Computes the bitwise OR of this container with another (union).
|
static Container |
rangeOfOnes(int start,
int last)
Create a container initialized with a range of consecutive values
|
abstract int |
rank(short lowbits)
Rank returns the number of integers that are smaller or equal to x (Rank(infinity) would be GetCardinality()).
|
abstract Container |
remove(short x)
Remove the short from this container.
|
abstract short |
select(int j)
Return the jth value
|
abstract void |
serialize(DataOutput out)
Serialize the container.
|
abstract int |
serializedSizeInBytes()
Report the number of bytes required to serialize this container.
|
abstract void |
trim()
If possible, recover wasted memory.
|
protected abstract void |
writeArray(DataOutput out)
Write just the underlying array.
|
abstract Container |
xor(ArrayContainer x)
Computes the bitwise OR of this container with another (union).
|
abstract Container |
xor(BitmapContainer x)
Computes the bitwise OR of this container with another (union).
|
Container |
xor(Container x)
Computes the bitwise OR of this container with another (union).
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, iterator, spliteratorreadExternal, writeExternalpublic static Container rangeOfOnes(int start, int last)
start - first indexlast - last index (range in inclusive)public abstract Container add(short x)
x - short to be addedpublic abstract Container and(ArrayContainer x)
x - other containerpublic abstract Container and(BitmapContainer x)
x - other containerpublic Container and(Container x)
x - other containerpublic abstract Container andNot(ArrayContainer x)
x - other containerpublic abstract Container andNot(BitmapContainer x)
x - other containerpublic Container andNot(Container x)
x - other containerpublic abstract void clear()
public abstract boolean contains(short x)
x - value to checkpublic abstract void deserialize(DataInput in) throws IOException
in - the DataInput streamIOException - Signals that an I/O exception has occurred.public abstract void fillLeastSignificant16bits(int[] x,
int i,
int mask)
x - provided arrayi - starting indexmask - indicates most significant bitsprotected abstract int getArraySizeInBytes()
public abstract int getCardinality()
public abstract ShortIterator getShortIterator()
public abstract int getSizeInBytes()
public abstract Container iand(ArrayContainer x)
x - other containerpublic abstract Container iand(BitmapContainer x)
x - other containerpublic Container iand(Container x)
x - other containerpublic abstract Container iandNot(ArrayContainer x)
x - other containerpublic abstract Container iandNot(BitmapContainer x)
x - other containerpublic Container iandNot(Container x)
x - other containerpublic abstract Container inot(int rangeStart, int rangeEnd)
rangeStart - beginning of range (inclusive); 0 is beginning of this
container.rangeEnd - ending of range (exclusive)public abstract Container ior(ArrayContainer x)
x - other containerpublic abstract Container ior(BitmapContainer x)
x - other containerpublic Container ior(Container x)
x - other containerpublic abstract Container ixor(ArrayContainer x)
x - other containerpublic abstract Container ixor(BitmapContainer x)
x - other containerpublic Container ixor(Container x)
x - other containerpublic abstract Container not(int rangeStart, int rangeEnd)
rangeStart - beginning of range (inclusive); 0 is beginning of this
container.rangeEnd - ending of range (exclusive)public abstract Container or(ArrayContainer x)
x - other containerpublic abstract Container or(BitmapContainer x)
x - other containerpublic Container or(Container x)
x - other containerpublic abstract Container remove(short x)
x - to be removedpublic abstract void serialize(DataOutput out) throws IOException
out - the DataOutput streamIOException - Signals that an I/O exception has occurred.public abstract int serializedSizeInBytes()
public abstract void trim()
protected abstract void writeArray(DataOutput out) throws IOException
out - output streamIOException - in case of failurepublic abstract Container xor(ArrayContainer x)
x - other containerpublic abstract Container xor(BitmapContainer x)
x - other containerpublic Container xor(Container x)
x - other parameterpublic abstract int rank(short lowbits)
lowbits - upper limitpublic abstract short select(int j)
j - index of the valuepublic abstract Container limit(int maxcardinality)
maxcardinality - maximal cardinalityCopyright © 2014. All Rights Reserved.