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

io.deephaven.engine.table.iterators.SerialDoubleColumnIterator Maven / Gradle / Ivy

Go to download

Engine API: Engine API module, suitable as a compile-time dependency for most queries

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

import io.deephaven.engine.rowset.RowSet;
import io.deephaven.engine.table.ColumnSource;
import org.jetbrains.annotations.NotNull;

/**
 * Serial {@link DoubleColumnIterator} implementation for {@link ColumnSource column sources} of primitive doubles.
 */
public final class SerialDoubleColumnIterator
        extends SerialColumnIterator
        implements DoubleColumnIterator {

    /**
     * Create a new SerialDoubleColumnIterator.
     *
     * @param columnSource The {@link ColumnSource} to fetch values from
     * @param rowSet The {@link RowSet} to iterate over
     * @param firstRowKey The first row key from {@code rowSet} to iterate
     * @param length The total number of rows to iterate
     */
    public SerialDoubleColumnIterator(
            @NotNull final ColumnSource columnSource,
            @NotNull final RowSet rowSet,
            final long firstRowKey,
            final long length) {
        super(columnSource, rowSet, firstRowKey, length);
    }

    /**
     * Create a new SerialDoubleColumnIterator.
     *
     * @param columnSource The {@link ColumnSource} to fetch values from
     * @param rowSet The {@link RowSet} to iterate over
     */
    public SerialDoubleColumnIterator(
            @NotNull final ColumnSource columnSource,
            @NotNull final RowSet rowSet) {
        this(columnSource, rowSet, rowSet.firstRowKey(), rowSet.size());
    }

    @Override
    public double nextDouble() {
        return columnSource.getDouble(advanceAndGetNextRowKey());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy