public class DateWrapper extends Object implements TemporalWrapper<Date>
TemporalWrapper to wrap Date objects.| Constructor and Description |
|---|
DateWrapper(Date date) |
DateWrapper(int year,
Month month,
int dayOfMonth) |
DateWrapper(int year,
Month month,
int dayOfMonth,
int hour,
int minute,
int second) |
DateWrapper(int year,
Month month,
int dayOfMonth,
int hour,
int minute,
int second,
int millis) |
DateWrapper(LocalDate date) |
| Modifier and Type | Method and Description |
|---|---|
long |
difference(Date other,
ChronoUnit unit)
Return the difference in units between this time and the other time in the given units
|
boolean |
isAfter(Date other) |
boolean |
isBefore(Date other) |
boolean |
isSame(Date other) |
boolean |
isSameDay(Date other) |
Date |
unwrap() |
public DateWrapper(Date date)
public DateWrapper(LocalDate date)
public DateWrapper(int year,
Month month,
int dayOfMonth)
public DateWrapper(int year,
Month month,
int dayOfMonth,
int hour,
int minute,
int second)
public DateWrapper(int year,
Month month,
int dayOfMonth,
int hour,
int minute,
int second,
int millis)
public long difference(Date other, ChronoUnit unit)
TemporalWrapperdifference in interface TemporalWrapper<Date>public boolean isAfter(Date other)
isAfter in interface TemporalWrapper<Date>other - a temporal to test againsttrue if this temporal is after the otherpublic boolean isBefore(Date other)
isBefore in interface TemporalWrapper<Date>other - a temporal to test againsttrue if this temporal is after the otherpublic boolean isSame(Date other)
isSame in interface TemporalWrapper<Date>other - a temporal to test againsttrue if this temporal is after the otherpublic boolean isSameDay(Date other)
isSameDay in interface TemporalWrapper<Date>other - a temporal to test againsttrue if this temporal is after the otherpublic Date unwrap()
unwrap in interface TemporalWrapper<Date>Copyright © 2015. All rights reserved.