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

io.deephaven.engine.table.impl.ImmutableColumnSource 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;

import io.deephaven.engine.table.ColumnSource;

/**
 * Sub-interface of {@link ColumnSource} for implementations that always use return {@code true} from
 * {@link #isImmutable()} and delegate all {@code getPrev*} methods to their current (non-previous) equivalents.
 */
public interface ImmutableColumnSource extends ColumnSource {

    @Override
    default DATA_TYPE getPrev(final long rowKey) {
        return get(rowKey);
    }

    @Override
    default Boolean getPrevBoolean(final long rowKey) {
        return getBoolean(rowKey);
    }

    @Override
    default byte getPrevByte(final long rowKey) {
        return getByte(rowKey);
    }

    @Override
    default char getPrevChar(final long rowKey) {
        return getChar(rowKey);
    }

    @Override
    default double getPrevDouble(final long rowKey) {
        return getDouble(rowKey);
    }

    @Override
    default float getPrevFloat(final long rowKey) {
        return getFloat(rowKey);
    }

    @Override
    default int getPrevInt(final long rowKey) {
        return getInt(rowKey);
    }

    @Override
    default long getPrevLong(final long rowKey) {
        return getLong(rowKey);
    }

    @Override
    default short getPrevShort(final long rowKey) {
        return getShort(rowKey);
    }

    @Override
    default boolean isImmutable() {
        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy