Package jmri
Enum Manager.NameValidity
- java.lang.Object
-
- java.lang.Enum<Manager.NameValidity>
-
- jmri.Manager.NameValidity
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Manager.NameValidity>
public static enum Manager.NameValidity extends java.lang.Enum<Manager.NameValidity>
Code the validity (including just as a prefix) of a proposed name string.- Since:
- 4.9.5
-
-
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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Manager.NameValidity
valueOf(java.lang.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 Detail
-
VALID
public static final Manager.NameValidity VALID
Indicates the name is valid as is, and can also be a valid prefix for longer names
-
INVALID
public static final Manager.NameValidity 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
public static final Manager.NameValidity 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 Detail
-
values
public static Manager.NameValidity[] 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 (Manager.NameValidity c : Manager.NameValidity.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Manager.NameValidity 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 namejava.lang.NullPointerException
- if the argument is null
-
-