Enum ECertificateValidityUnit
- java.lang.Object
-
- java.lang.Enum<ECertificateValidityUnit>
-
- de.xima.fc.certificate.gui.internal.create.ECertificateValidityUnit
-
- All Implemented Interfaces:
Serializable,Comparable<ECertificateValidityUnit>
public enum ECertificateValidityUnit extends Enum<ECertificateValidityUnit>
Enumeration representing the units of validity for a certificate. This enum provides different time units that can be used to specify the validity period of a certificate.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ChronoUnitasChronoUnit()Converts the current enum value to the correspondingChronoUnit.StringgetDisplayName(Locale locale)Returns the display name of the enum value in the specified locale.static ECertificateValidityUnitvalueOf(String name)Returns the enum constant of this type with the specified name.static ECertificateValidityUnit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DAYS
public static final ECertificateValidityUnit DAYS
Represents a validity period in days.
-
WEEKS
public static final ECertificateValidityUnit WEEKS
Represents a validity period in weeks.
-
MONTHS
public static final ECertificateValidityUnit MONTHS
Represents a validity period in months.
-
YEARS
public static final ECertificateValidityUnit YEARS
Represents a validity period in years.
-
-
Method Detail
-
values
public static ECertificateValidityUnit[] 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 (ECertificateValidityUnit c : ECertificateValidityUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ECertificateValidityUnit 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 nameNullPointerException- if the argument is null
-
asChronoUnit
public ChronoUnit asChronoUnit()
Converts the current enum value to the correspondingChronoUnit.- Returns:
- the corresponding
ChronoUnitfor the current enum value. - Throws:
IllegalStateException- if the enum value is unexpected.
-
-