public interface ProxyInstant extends ProxyDate, ProxyTime, ProxyTimeZone
ProxyDate, ProxyTime and ProxyTimeZone.| Modifier and Type | Method and Description |
|---|---|
default LocalDate |
asDate()
Returns the date information.
|
Instant |
asInstant()
Returns the instant information.
|
default LocalTime |
asTime()
Returns the time information.
|
default ZoneId |
asTimeZone()
Returns the timezone information.
|
static ProxyInstant |
from(Instant instant)
Creates a new proxy instant from a Java instant value.
|
fromInstant asInstant()
null.
The following invariant must always hold for instant proxies:
ProxyInstant proxy = ... ZoneId zone = proxy.getTimeZone(); LocalDate date = proxy.getDate(); LocalTime time = proxy.getTime(); assert ZonedDateTime.of(date, time, zone).equals(proxy.getInstant());
default LocalDate asDate()
null.
The invariant specified in ProxyInstant.asInstant() must always hold for proxy instant values.asDate in interface ProxyDateProxyInstant.asInstant()default LocalTime asTime()
null.
The invariant specified in ProxyInstant.asInstant() must always hold for proxy instant values.asTime in interface ProxyTimeProxyInstant.asInstant()default ZoneId asTimeZone()
null.
The invariant specified in ProxyInstant.asInstant() must always hold for proxy instant values.asTimeZone in interface ProxyTimeZoneProxyInstant.asInstant()static ProxyInstant from(Instant instant)