Package com.helger.datetime.domain
Interface IHasCreationDateTime
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface IHasCreationDateTime
Interface for objects having a creation date time.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default LocalDategetCreationDate()LocalDateTimegetCreationDateTime()default LocalTimegetCreationTime()default booleanhasCreationDateTime()default booleanisCreatedAt(LocalDateTime aDT)Check if the object was created at the specified local date time.
-
-
-
Method Detail
-
getCreationDateTime
@Nullable LocalDateTime getCreationDateTime()
- Returns:
- The maybe
nullcreation date time of the object. Usually it is notnullbut in case this interface is needed for legacy objects where the information was not yet stored, it may benull.
-
hasCreationDateTime
default boolean hasCreationDateTime()
- Returns:
trueif a creation date time is present,falseif not.- See Also:
getCreationDateTime()
-
getCreationDate
@Nullable default LocalDate getCreationDate()
- Returns:
- The extracted date from the creation date and time or
nullif no creation date time is present.
-
getCreationTime
@Nullable default LocalTime getCreationTime()
- Returns:
- The extracted time from the creation date and time or
nullif no creation date time is present.
-
isCreatedAt
default boolean isCreatedAt(@Nonnull LocalDateTime aDT)
Check if the object was created at the specified local date time. This istrue, if the creation time is ≤ than the specified local date time.- Parameters:
aDT- The time to check for creation. May not benull.- Returns:
trueif this object was created,falseif not.- Since:
- 9.1.6
-
-