public class EnumUtils extends Object
Constructor and Description |
---|
EnumUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
ConvertToStringWithSpaces(String value) |
static <E extends Enum<E>> |
nameOrNull(E enumInstance)
Return the value of the
Enum.name() method for the given enum instance if it's not null ,
otherwise return null . |
static <E extends Enum<E>> |
valueOf(Class<E> c,
String name,
boolean ignorecase) |
public static <E extends Enum<E>> String nameOrNull(E enumInstance)
Enum.name()
method for the given enum instance if it's not null
,
otherwise return null
.E
- The type of the enum.enumInstance
- The instance to get the name from.null
if the instance is null, result of Enum.name()
otherwise.Copyright © 2012. All Rights Reserved.