@Internal public final class TimestampTemporal extends java.lang.Object implements Temporal<TimestampTemporal>
Temporal
for the Protobuf Timestamp
.Modifier and Type | Method and Description |
---|---|
static TimestampTemporal |
from(com.google.protobuf.Timestamp value)
Creates a new instance with the given
Timestamp . |
com.google.protobuf.Any |
toAny()
Packs this point in time into an
Any . |
com.google.protobuf.Timestamp |
toTimestamp()
Obtains this point in time as a Protobuf
Timestamp . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareTo, isBetween, isEarlierOrSameAs, isEarlierThan, isInFuture, isInPast, isLaterOrSameAs, isLaterThan, isSameAs, toInstant
public static TimestampTemporal from(com.google.protobuf.Timestamp value)
Timestamp
.
The given value must be valid in terms of Timestamps.checkValid(..)
. Otherwise,
as IllegalStateException
is thrown.
public com.google.protobuf.Timestamp toTimestamp()
Temporal
Timestamp
.
The Protobuf Timestamp
represents the UTC Epoch time. All the implementations
should assemble timestamps regarding that fact.
If this Temporal
type lacks precision of the Timestamp
, such as seconds,
nanoseconds, etc., the smallest possible value of Timestamp
should be returned.
For example, if this type represents time up to a minute, the value 01-02-2019 09:40
is translated to the timestamp as if it was 01-02-2019 09:40:00.000000000
(with zero
seconds and zero nanoseconds). Similarly, if the type only represents a year, then
the obtained timestamp points at the 1st of January 00:00:00
of that year.
toTimestamp
in interface Temporal<TimestampTemporal>
Timestamp
public com.google.protobuf.Any toAny()
Temporal
Any
.toAny
in interface Temporal<TimestampTemporal>
Any