Class ExpirationUtils


  • public class ExpirationUtils
    extends Object
    • Constructor Detail

      • ExpirationUtils

        public ExpirationUtils()
    • Method Detail

      • isExpired

        public static boolean isExpired​(ExpirableEntity entity,
                                        boolean allowInfiniteValues)
        Checks whether the entity is expired
        Parameters:
        entity - to check
        allowInfiniteValues - sets how null values are interpreted, if true entity with expiration equal to null is interpreted as never expiring entity, if false entities with null expiration are interpreted as expired entities
        Returns:
        true if the entity is expired (expiration time is in the past or now), false otherwise
      • isNotExpired

        public static boolean isNotExpired​(Object entity)