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