All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.deephaven.chunk.ResettableBooleanChunkChunk Maven / Gradle / Ivy

The newest version!
//
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
//
// ****** AUTO-GENERATED CLASS - DO NOT EDIT MANUALLY
// ****** Edit ResettableCharChunkChunk and run "./gradlew replicateSourcesAndChunks" to regenerate
//
// @formatter:off
package io.deephaven.chunk;

import io.deephaven.chunk.attributes.Any;

public class ResettableBooleanChunkChunk extends BooleanChunkChunk
        implements ResettableChunkChunk {

    public static  ResettableBooleanChunkChunk makeResettableChunk() {
        return new ResettableBooleanChunkChunk<>();
    }

    private ResettableBooleanChunkChunk(BooleanChunk[] data, int offset, int capacity) {
        super(data, offset, capacity);
    }

    private ResettableBooleanChunkChunk() {
        this(BooleanChunk.getEmptyChunkArray(), 0, 0);
    }

    @Override
    public ResettableBooleanChunkChunk slice(int offset, int capacity) {
        ChunkHelpers.checkSliceArgs(size, offset, capacity);
        return new ResettableBooleanChunkChunk<>(data, this.offset + offset, capacity);
    }

    @Override
    public final void resetFromChunk(ChunkChunk other, int offset, int capacity) {
        resetFromTypedChunk(other.asBooleanChunkChunk(), offset, capacity);
    }

    @Override
    public final void resetFromArray(Object array, int offset, int capacity) {
        // noinspection unchecked
        final BooleanChunk[] typedArray = (BooleanChunk[]) array;
        resetFromTypedArray(typedArray, offset, capacity);
    }

    public final void resetFromTypedChunk(BooleanChunkChunk other, int offset, int capacity) {
        ChunkHelpers.checkSliceArgs(other.size, offset, capacity);
        resetFromTypedArray(other.data, other.offset + offset, capacity);
    }

    public final void resetFromTypedArray(BooleanChunk[] data, int offset, int capacity) {
        ChunkHelpers.checkArrayArgs(data.length, offset, capacity);
        this.data = data;
        this.offset = offset;
        this.capacity = capacity;
        this.size = capacity;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy