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

io.deephaven.engine.table.impl.sources.InstantAsLongColumnSource Maven / Gradle / Ivy

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

import io.deephaven.engine.table.ColumnSource;
import io.deephaven.time.DateTimeUtils;

import java.time.Instant;

/**
 * Reinterpret result {@link ColumnSource} implementations that translates {@link Instant} to {@code long} values.
 */
public class InstantAsLongColumnSource extends UnboxedTimeBackedColumnSource {
    public InstantAsLongColumnSource(ColumnSource alternateColumnSource) {
        super(alternateColumnSource);
    }

    @Override
    protected long toEpochNano(Instant val) {
        return DateTimeUtils.epochNanos(val);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy