@Internal
public final class Temporals
extends java.lang.Object
Temporal
instances.Modifier and Type | Method and Description |
---|---|
static Temporal<?> |
from(java.time.Instant instant)
Produces an instance of
Temporal from the given Instant . |
static Temporal<?> |
from(com.google.protobuf.Message value)
Produces an instance of
Temporal from the given message. |
public static Temporal<?> from(com.google.protobuf.Message value)
Temporal
from the given message.
If the given message is a Timestamp
, produces a wrapper Temporal
instance.
If the given message is a Temporal
, returns it without a change. Otherwise, throws
an IllegalArgumentException
.
value
- message to convertTemporal
public static Temporal<?> from(java.time.Instant instant)
Temporal
from the given Instant
.instant
- the instance of Instant
to convert into a Temporal
Temporal
Instant
into a Timestamp
and generates
a Temporal
from the Timestamp