Package jmri
Enum Manager.NameValidity
- All Implemented Interfaces:
Serializable
,Comparable<Manager.NameValidity>
,java.lang.constant.Constable
public static enum Manager.NameValidity extends Enum<Manager.NameValidity>
Code the validity (including just as a prefix) of a proposed name string.
- Since:
- 4.9.5
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description INVALID
Indicates name is not valid as-is, nor can it be made valid by adding more characters; just a bad name.VALID
Indicates the name is valid as is, and can also be a valid prefix for longer namesVALID_AS_PREFIX_ONLY
Indicates that adding additional characters might (or might not) turn this into a valid name; it is not a valid name now. -
Method Summary
Modifier and Type Method Description static Manager.NameValidity
valueOf(String name)
Returns the enum constant of this type with the specified name.static Manager.NameValidity[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
VALID
Indicates the name is valid as is, and can also be a valid prefix for longer names -
INVALID
Indicates name is not valid as-is, nor can it be made valid by adding more characters; just a bad name. -
VALID_AS_PREFIX_ONLY
Indicates that adding additional characters might (or might not) turn this into a valid name; it is not a valid name now.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-