io.deephaven.engine.table.impl.sources.ZonedDateTimeAsLongSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-table Show documentation
Show all versions of deephaven-engine-table Show documentation
Engine Table: Implementation and closely-coupled utilities
/**
* 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.ZonedDateTime;
/**
* Reinterpret result {@link ColumnSource} implementations that translates {@link ZonedDateTime} to {@code long} values.
*/
public class ZonedDateTimeAsLongSource extends UnboxedTimeBackedColumnSource {
public ZonedDateTimeAsLongSource(ColumnSource alternateColumnSource) {
super(alternateColumnSource);
}
@Override
protected long toEpochNano(ZonedDateTime val) {
return DateTimeUtils.epochNanos(val);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy