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

io.deephaven.engine.table.impl.sources.regioned.DeferredColumnRegion 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;

/**
 * Adds region factory for deferred column regions implementations. Deferred regions serve as placeholders, constructing
 * (and usually swapping themselves for) the "real" region on first access.
 */
interface DeferredColumnRegion>
        extends ColumnRegion {

    /**
     * Get (and possibly construct) the "real" region whose construction was deferred.
     *
     * @return The "real" region whose construction was deferred
     */
    REGION_TYPE getResultRegion();

    static , INNER_REGION_TYPE extends REGION_TYPE> REGION_TYPE materialize(
            INNER_REGION_TYPE region) {
        // noinspection unchecked
        return region instanceof DeferredColumnRegion
                ? ((DeferredColumnRegion) region).getResultRegion()
                : region;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy