public final class AdaptableDate extends Object
LocalDateTime, allowing to be a static one, 
 or a relative one to the moment the resolveDateTime() method is called.
 AdaptableDate can be resolved mutliple times, without being a problem at all, it just can lead to different results.
 AdaptableDate with:
 fromDateTime(java.time.LocalDateTime) to have a static one, always resolved as the same given LocalDateTimefromDate(java.time.LocalDate) to have a static one, always resolved as the same given LocalDate (at the start of the day)now() to have one resolved as the current LocalDateTime when resolveDateTime() is calledfuture(long, java.time.temporal.TemporalUnit) to have one resolved with the given amount of given TemporalUnit added to the current LocalDateTime when resolveDateTime() is calledpast(long, java.time.temporal.TemporalUnit) to have one resolved with the given amount of given TemporalUnit subtracted to the current LocalDateTime when resolveDateTime() is called| Modifier and Type | Class and Description | 
|---|---|
| private static class  | AdaptableDate.AdaptableDateType | 
| private static class  | AdaptableDate.OffsetType | 
| Modifier and Type | Field and Description | 
|---|---|
| private static AdaptableDate | __NOW | 
| private long | _relativeAmount | 
| private AdaptableDate.OffsetType | _relativeOffsetType | 
| private TemporalUnit | _relativeUnit | 
| private LocalDateTime | _staticValue | 
| private AdaptableDate.AdaptableDateType | _type | 
| Modifier | Constructor and Description | 
|---|---|
| private  | AdaptableDate(AdaptableDate.OffsetType offsetType,
             long amount,
             TemporalUnit unit) | 
| private  | AdaptableDate(LocalDateTime date) | 
| Modifier and Type | Method and Description | 
|---|---|
| static AdaptableDate | fromDate(LocalDate date)Gets a static  AdaptableDate, always resolved as the givenLocalDate | 
| static AdaptableDate | fromDateTime(LocalDateTime dateTime)Gets a static  AdaptableDate, always resolved as the givenLocalDateTime | 
| static AdaptableDate | future(long amount,
      TemporalUnit unit)Gets an  AdaptableDate, resolved as the currentLocalDateTimeat the moment of thecall, 
 plus the given amount of the givenTemporalUnit, so as to get aLocalDateTimein the future | 
| static AdaptableDate | now() | 
| static AdaptableDate | past(long amount,
    TemporalUnit unit)Gets an  AdaptableDate, resolved as the currentLocalDateTimeat the moment of thecall, 
 minus the given amount of the givenTemporalUnit, so as to get aLocalDateTimein the past | 
| LocalDate | resolveDate()Resolves this  AdaptableDate | 
| LocalDateTime | resolveDateTime()Resolves this  AdaptableDate | 
| String | toString() | 
private static final AdaptableDate __NOW
private final AdaptableDate.AdaptableDateType _type
private final LocalDateTime _staticValue
private final TemporalUnit _relativeUnit
private final long _relativeAmount
private final AdaptableDate.OffsetType _relativeOffsetType
private AdaptableDate(LocalDateTime date)
private AdaptableDate(AdaptableDate.OffsetType offsetType, long amount, TemporalUnit unit)
public static AdaptableDate fromDateTime(LocalDateTime dateTime)
AdaptableDate, always resolved as the given LocalDateTimedateTime - The LocalDateTimeAdaptableDatepublic static AdaptableDate fromDate(LocalDate date)
AdaptableDate, always resolved as the given LocalDatedate - The LocalDateAdaptableDatepublic static AdaptableDate now()
AdaptableDatepublic static AdaptableDate past(long amount, TemporalUnit unit)
AdaptableDate, resolved as the current LocalDateTime at the moment of the call, 
 minus the given amount of the given TemporalUnit, so as to get a LocalDateTime in the pastamount - The amount to subtractunit - The TemporalUnit of the amount to subtractAdaptableDatepublic static AdaptableDate future(long amount, TemporalUnit unit)
AdaptableDate, resolved as the current LocalDateTime at the moment of the call, 
 plus the given amount of the given TemporalUnit, so as to get a LocalDateTime in the futureamount - The amount to addunit - The TemporalUnit of the amount to addAdaptableDatepublic LocalDateTime resolveDateTime()
AdaptableDateLocalDateTimepublic LocalDate resolveDate()
AdaptableDateLocalDate