Interface IExpirable

    • Method Detail

      • getExpirationDateTime

        @Nullable
        LocalDateTime getExpirationDateTime()
        Returns:
        The date time when the object will expire/expired. May be null if no expiration is defined.
      • isExpirationDefined

        default boolean isExpirationDefined()
        Check if the object has an expiration date defined. To check if the object is already expired, use isExpiredNow() instead.
        Returns:
        true if an expiration date is defined, false otherwise.
      • isExpiredNow

        default boolean isExpiredNow()
        Check if this object is already expired. This is only possible if an expiration date is defined.
        Returns:
        true if an expiration date is defined and the expiration date is in the past, false otherwise.
        See Also:
        isExpirationDefined()
      • isExpiredAt

        default boolean isExpiredAt​(@Nonnull
                                    LocalDateTime aDT)
        Check if this object is expired at the provided date time. This is only possible if an expiration date is defined.
        Parameters:
        aDT - The date time to check against. May not be null.
        Returns:
        true if an expiration date is defined and the expiration date is in the past, false otherwise.
        See Also:
        isExpirationDefined()