Enum AgeRestriction

  • All Implemented Interfaces:
    Localized, java.io.Serializable, java.lang.Comparable<AgeRestriction>

    public enum AgeRestriction
    extends java.lang.Enum<AgeRestriction>
    implements Localized
    Describes how the age of something (such as a historical tag value) is handled.

    This enum has been modified to include time based capping (it was originally just unlimited, or "capped" - based on execution count).

    • Method Detail

      • values

        public static AgeRestriction[] 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 (AgeRestriction c : AgeRestriction.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AgeRestriction valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getIntValue

        public int getIntValue()
        Returns the integer representation of this enum
      • isTimeRestriction

        public boolean isTimeRestriction()
      • getAsTimeUnits

        public TimeUnits getAsTimeUnits()
        Returns the TimeUnits for the value, if the value is a time restriction. Otherwise, returns null.
      • getTypeForValue

        public static AgeRestriction getTypeForValue​(int val)
        Returns the AgeRestriction for the given type code. Returns Unlimited if there is no value defined mode for the given value.
      • toString

        public java.lang.String toString​(java.util.Locale locale)
        Specified by:
        toString in interface Localized