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

io.deephaven.engine.table.impl.sources.regioned.DeferredColumnRegionByte Maven / Gradle / Ivy

There is a newer version: 0.37.1
Show newest version
/**
 * Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
 */
package io.deephaven.engine.table.impl.sources.regioned;

import io.deephaven.chunk.attributes.Any;
import org.jetbrains.annotations.NotNull;

import java.util.function.Supplier;

/**
 * {@link ColumnRegionChar} implementation for deferred regions, i.e. regions that will be properly constructed on
 * first access.
 */
class DeferredColumnRegionByte extends DeferredColumnRegionBase>
        implements ColumnRegionByte {

    DeferredColumnRegionByte(final long pageMask, @NotNull Supplier> resultRegionFactory) {
        super(pageMask, resultRegionFactory);
    }

    @Override
    public byte getByte(long elementIndex) {
        return getResultRegion().getByte(elementIndex);
    }

    @Override
    public byte getByte(@NotNull FillContext context, long elementIndex) {
        return getResultRegion().getByte(context, elementIndex);
    }

    public byte[] getBytes(long firstElementIndex, @NotNull byte[] destination, int destinationOffset, int length) {
        return getResultRegion().getBytes(firstElementIndex, destination, destinationOffset, length);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy