public class ZonedDateTimeWrapper extends Object implements TemporalWrapper<ZonedDateTime>
TemporalWrapper which wraps a
ZonedDateTime instance| Constructor and Description |
|---|
ZonedDateTimeWrapper(Date date) |
ZonedDateTimeWrapper(Date date,
TemporalUnit accuracy) |
ZonedDateTimeWrapper(int year,
Month month,
int dayOfMonth,
int hour,
int minute,
int second,
int nanos,
ZoneId zone) |
ZonedDateTimeWrapper(int year,
Month month,
int dayOfMonth,
int hour,
int minute,
int second,
ZoneId zone) |
ZonedDateTimeWrapper(int year,
Month month,
int dayOfMonth,
ZoneId zone) |
ZonedDateTimeWrapper(LocalDateTime date,
ZoneId zone) |
ZonedDateTimeWrapper(LocalDateTime date,
ZoneId zone,
TemporalUnit accuracy) |
ZonedDateTimeWrapper(ZonedDateTime date) |
ZonedDateTimeWrapper(ZonedDateTime date,
TemporalUnit accuracy) |
| Modifier and Type | Method and Description |
|---|---|
long |
difference(ZonedDateTime other,
ChronoUnit unit)
Return the difference in units between this time and the other time in the given units
|
boolean |
isAfter(ZonedDateTime other) |
boolean |
isBefore(ZonedDateTime other) |
boolean |
isSame(ZonedDateTime other) |
ZonedDateTime |
unwrap() |
TemporalWrapper<ZonedDateTime> |
withZone(ZoneId zone)
Makes a copy of this wrapper based on a given time zone.
|
public ZonedDateTimeWrapper(Date date)
public ZonedDateTimeWrapper(Date date, TemporalUnit accuracy)
public ZonedDateTimeWrapper(ZonedDateTime date)
public ZonedDateTimeWrapper(ZonedDateTime date, TemporalUnit accuracy)
public ZonedDateTimeWrapper(LocalDateTime date, ZoneId zone)
public ZonedDateTimeWrapper(LocalDateTime date, ZoneId zone, TemporalUnit accuracy)
public ZonedDateTimeWrapper(int year,
Month month,
int dayOfMonth,
int hour,
int minute,
int second,
ZoneId zone)
public ZonedDateTimeWrapper(int year,
Month month,
int dayOfMonth,
int hour,
int minute,
int second,
int nanos,
ZoneId zone)
public long difference(ZonedDateTime other, ChronoUnit unit)
TemporalWrapperdifference in interface TemporalWrapper<ZonedDateTime>public boolean isAfter(ZonedDateTime other)
isAfter in interface TemporalWrapper<ZonedDateTime>other - a temporal to test againsttrue if this temporal is after the otherpublic boolean isBefore(ZonedDateTime other)
isBefore in interface TemporalWrapper<ZonedDateTime>other - a temporal to test againsttrue if this temporal is before the otherpublic boolean isSame(ZonedDateTime other)
isSame in interface TemporalWrapper<ZonedDateTime>other - a temporal to test againsttrue if this temporal is the same as the otherpublic ZonedDateTime unwrap()
unwrap in interface TemporalWrapper<ZonedDateTime>public TemporalWrapper<ZonedDateTime> withZone(ZoneId zone)
TemporalWrapperwithZone in interface TemporalWrapper<ZonedDateTime>zone - a new reference time zoneCopyright © 2019. All rights reserved.