Package io.trino.array
Class BooleanBigArray
- java.lang.Object
-
- io.trino.array.BooleanBigArray
-
public final class BooleanBigArray extends Object
-
-
Constructor Summary
Constructors Constructor Description BooleanBigArray()Creates a new big array containing one initial segmentBooleanBigArray(boolean initialValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyTo(long sourceIndex, BooleanBigArray destination, long destinationIndex, long length)Copies this array, beginning at the specified sourceIndex, to the specified destinationIndex of the destination array.voidensureCapacity(long length)Ensures this big array is at least the specified length.voidfill(boolean value)Fills the entire big array with the specified value.booleanget(long index)Returns the element of this big array at specified index.voidset(long index, boolean value)Sets the element of this big array at specified index.longsizeOf()Returns the size of this big array in bytes.
-
-
-
Method Detail
-
sizeOf
public long sizeOf()
Returns the size of this big array in bytes.
-
get
public boolean get(long index)
Returns the element of this big array at specified index.- Parameters:
index- a position in this big array.- Returns:
- the element of this big array at the specified position.
-
set
public void set(long index, boolean value)Sets the element of this big array at specified index.- Parameters:
index- a position in this big array.
-
ensureCapacity
public void ensureCapacity(long length)
Ensures this big array is at least the specified length. If the array is smaller, segments are added until the array is larger then the specified length.
-
fill
public void fill(boolean value)
Fills the entire big array with the specified value.
-
copyTo
public void copyTo(long sourceIndex, BooleanBigArray destination, long destinationIndex, long length)Copies this array, beginning at the specified sourceIndex, to the specified destinationIndex of the destination array. A subsequence of this array's components are copied to the destination array referenced bydestination. The number of components copied is equal to thelengthargument. The components at positionssourceIndexthroughsourceIndex+length-1in this array are copied into positionsdestinationIndexthroughdestinationIndex+length-1, respectively, of the destination array.
-
-