io.deephaven.chunk.util.factories.BooleanChunkFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-chunk Show documentation
Show all versions of deephaven-engine-chunk Show documentation
Engine Chunks: Array-like data structures for dense, efficient data movement
The newest version!
//
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
//
// ****** AUTO-GENERATED CLASS - DO NOT EDIT MANUALLY
// ****** Edit CharChunkFactory and run "./gradlew replicateSourcesAndChunks" to regenerate
//
// @formatter:off
package io.deephaven.chunk.util.factories;
import io.deephaven.chunk.*;
import io.deephaven.chunk.attributes.Any;
import org.jetbrains.annotations.NotNull;
import java.util.function.IntFunction;
public class BooleanChunkFactory implements ChunkFactory {
@NotNull
@Override
public final boolean[] makeArray(int capacity) {
return BooleanChunk.makeArray(capacity);
}
@NotNull
@Override
public final BooleanChunk[] makeChunkArray(int capacity) {
return BooleanChunkChunk.makeArray(capacity);
}
@NotNull
@Override
public final BooleanChunk getEmptyChunk() {
return BooleanChunk.getEmptyChunk();
}
@NotNull
@Override
public final BooleanChunkChunk getEmptyChunkChunk() {
return BooleanChunkChunk.getEmptyChunk();
}
@NotNull
@Override
public final BooleanChunk chunkWrap(Object array) {
final boolean[] typedArray = (boolean[]) array;
return BooleanChunk.chunkWrap(typedArray);
}
@NotNull
@Override
public final BooleanChunk chunkWrap(Object array, int offset, int capacity) {
final boolean[] typedArray = (boolean[]) array;
return BooleanChunk.chunkWrap(typedArray, offset, capacity);
}
@NotNull
@Override
public final BooleanChunkChunk chunkChunkWrap(Chunk[] array) {
BooleanChunk[] typedArray = (BooleanChunk[]) array;
return BooleanChunkChunk.chunkWrap(typedArray);
}
@NotNull
@Override
public final BooleanChunkChunk chunkChunkWrap(Chunk[] array, int offset, int capacity) {
BooleanChunk[] typedArray = (BooleanChunk[]) array;
return BooleanChunkChunk.chunkWrap(typedArray, offset, capacity);
}
@NotNull
@Override
public final ResettableReadOnlyChunk makeResettableReadOnlyChunk() {
return ResettableBooleanChunk.makeResettableChunk();
}
@NotNull
@Override
public final ResettableChunkChunk makeResettableChunkChunk() {
return ResettableBooleanChunkChunk.makeResettableChunk();
}
@NotNull
@Override
public final WritableBooleanChunk makeWritableChunk(int capacity) {
return WritableBooleanChunk.makeWritableChunk(capacity);
}
@NotNull
@Override
public final WritableBooleanChunkChunk makeWritableChunkChunk(int capacity) {
return WritableBooleanChunkChunk.makeWritableChunk(capacity);
}
@NotNull
@Override
public final WritableBooleanChunk writableChunkWrap(Object array, int offset, int capacity) {
final boolean[] realType = (boolean[]) array;
return WritableBooleanChunk.writableChunkWrap(realType, offset, capacity);
}
@NotNull
@Override
public final WritableChunkChunk writableChunkChunkWrap(WritableChunk[] array,
int offset, int capacity) {
WritableBooleanChunk[] actual = (WritableBooleanChunk[]) array;
return WritableBooleanChunkChunk.writableChunkWrap(actual, offset, capacity);
}
@NotNull
@Override
public final ResettableWritableChunk makeResettableWritableChunk() {
return ResettableWritableBooleanChunk.makeResettableChunk();
}
@NotNull
@Override
public final ResettableWritableChunkChunk makeResettableWritableChunkChunk() {
return ResettableWritableBooleanChunkChunk.makeResettableChunk();
}
@NotNull
@Override
public final IntFunction chunkArrayBuilder() {
return BooleanChunk[]::new;
}
@NotNull
public final IntFunction writableChunkArrayBuilder() {
return WritableBooleanChunk[]::new;
}
}