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 Detail

      • getCreationDateTime

        @Nullable
        LocalDateTime getCreationDateTime()
        Returns:
        The maybe null creation date time of the object. Usually it is not null but in case this interface is needed for legacy objects where the information was not yet stored, it may be null.
      • hasCreationDateTime

        default boolean hasCreationDateTime()
        Returns:
        true if a creation date time is present, false if not.
        See Also:
        getCreationDateTime()
      • getCreationDate

        @Nullable
        default LocalDate getCreationDate()
        Returns:
        The extracted date from the creation date and time or null if no creation date time is present.
      • getCreationTime

        @Nullable
        default LocalTime getCreationTime()
        Returns:
        The extracted time from the creation date and time or null if 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 is true, if the creation time is ≤ than the specified local date time.
        Parameters:
        aDT - The time to check for creation. May not be null.
        Returns:
        true if this object was created, false if not.
        Since:
        9.1.6