Modifier and Type | Method and Description |
---|---|
String |
convert(E input) |
static <E extends Enum<E>> |
create(Class<E> enumType)
Construct a new formatter with no default value, i.e.
|
static <E extends Enum<E>> |
create(Class<E> enumType,
E defaultValue)
Construct a new formatter with the specified default value.
|
String |
error(String msg) |
public static <E extends Enum<E>> EnumFormatter<E> create(Class<E> enumType)
enumType
- The enum type.public static <E extends Enum<E>> EnumFormatter<E> create(Class<E> enumType, E defaultValue)
enumType
- The enum type.defaultValue
- The default value, which will never be output.public String convert(E input) throws IllegalArgumentException
Copyright © 2015 aQute SARL. All rights reserved.