Enum TermsOfServiceAcceptanceFrequency

    • Method Detail

      • values

        public static TermsOfServiceAcceptanceFrequency[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TermsOfServiceAcceptanceFrequency c : TermsOfServiceAcceptanceFrequency.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TermsOfServiceAcceptanceFrequency valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isActivated

        public boolean isActivated()
        Indicates if terms of service frequency is activated.
        Returns:
        true if the terms of service is activated. False otherwise.
      • isAcceptanceDateExpired

        public boolean isAcceptanceDateExpired​(Date tosAcceptanceDate)
        Indicates if the given acceptance date of terms of service is valid compared to the current date.
        Parameters:
        tosAcceptanceDate - the date at which the terms of service have been accepted.
        Returns:
        true if the acceptance date has expired. False otherwise.
      • decode

        public static TermsOfServiceAcceptanceFrequency decode​(String tosAcceptanceFrequency)
        Decode from a string value. NEVER by default (even the given value is unknown).
        Parameters:
        tosAcceptanceFrequency - a string encoding the frequency at which the acceptance of the terms of service has to be checked.
        Returns:
        the check frequency of the acceptance of the terms of service.