Enum Class GeneratorAlphabetRestriction
java.lang.Object
java.lang.Enum<GeneratorAlphabetRestriction>
org.emau.icmvc.ganimed.ttp.psn.enums.GeneratorAlphabetRestriction
- All Implemented Interfaces:
Serializable,Comparable<GeneratorAlphabetRestriction>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanWhen this flag is true and the option to use the last symbol of an alphabet as delimiter is enabled, the generator's alphabet restrictions are computed for the core alphabet only without the delimiter symbol. -
Method Summary
Modifier and TypeMethodDescriptionReturns a description for this restriction.intReturns invalid input: 'the length for valid alphabets if this restriction describes a constant length, otherwise 0]'.booleanReturns true if the specified alphabet fulfils this restriction.voidvalidateAlphabet(Alphabet alphabet, boolean useLastCharAsDelimiterAfterXChars) static GeneratorAlphabetRestrictionReturns the enum constant of this class with the specified name.static GeneratorAlphabetRestriction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
CONST_10
-
CONST_32
-
PRIME
-
PRIME_POWER
-
-
Field Details
-
CONSIDER_DELIMITER_CHAR_AS_ALPHABET_SYMBOL
public static final boolean CONSIDER_DELIMITER_CHAR_AS_ALPHABET_SYMBOLWhen this flag is true and the option to use the last symbol of an alphabet as delimiter is enabled, the generator's alphabet restrictions are computed for the core alphabet only without the delimiter symbol. Otherwise, the alphabet including the delimiter symbol must meet these restrictions.In the current implementation this flag is true.
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
isValid
Returns true if the specified alphabet fulfils this restriction.- Parameters:
alphabet- the alphabet to test- Returns:
- true if the specified alphabet fulfils this restriction
-
validateAlphabet
public void validateAlphabet(Alphabet alphabet, boolean useLastCharAsDelimiterAfterXChars) throws InvalidAlphabetException - Throws:
InvalidAlphabetException
-
getValidLength
public int getValidLength()Returns invalid input: 'the length for valid alphabets if this restriction describes a constant length, otherwise 0]'.- Returns:
- invalid input: 'the length for valid alphabets if this restriction describes a constant length, otherwise 0]'
-
getDescription
Returns a description for this restriction.- Returns:
- a description for this restriction
-