public enum NameUtils extends Enum<NameUtils>
Utility functions related to naming
Modifier and Type | Method and Description |
---|---|
static String |
canonicalizeForEnumTypes(String name)
Canonicalizes a name for use in enum types.
|
static String |
decanonicalizeFromEnumTypes(String name)
Convert enum type name to un-canonicalized name *
|
static NameUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NameUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static NameUtils[] values()
for (NameUtils c : NameUtils.values()) System.out.println(c);
public static NameUtils valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static String canonicalizeForEnumTypes(String name)
Canonicalizes a name for use in enum types. This specifically is for enum ids (values) that matched the enum name except were lower case and used hyphen delimiters vs upper case and underscores (enum naming convention)
name
- The un-canonicalized name.Copyright © 2016–2024. All rights reserved.