com.unit16.z.time.TimedI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unit16-z Show documentation
Show all versions of unit16-z Show documentation
A collection of utilities for representing and manipulating time series and such.
package com.unit16.z.time;
import java.util.function.Supplier;
public interface TimedI extends Supplier
, GMTMicros {
abstract static class Formatted
extends GMTMicros.NicelyFormatted
implements
TimedI
{
@Override public String toString()
{
return super.toString() + ":" + get().toString();
}
}
public static class I extends Formatted
{
private final long micros_;
private final Q p_;
public I(Q p, long ts)
{
micros_ = ts;
p_ = p;
}
@Override
public final long gmtMicros() { return micros_; }
@Override
public final Q get() { return p_; }
}
public static class M extends Formatted
{
public long micros_;
public Q p_;
@Override
public final long gmtMicros() { return micros_; }
@Override
public final Q get() { return p_; }
}
}