|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectaQute.bnd.build.model.conversions.EnumFormatter<E>
E - public class EnumFormatter<E extends Enum<E>>
Formats an enum type. Outputs null when the value of the enum is
equal to a default value.
| Method Summary | ||
|---|---|---|
String |
convert(E input)
|
|
static
|
create(Class<E> enumType)
Construct a new formatter with no default value, i.e. |
|
static
|
create(Class<E> enumType,
E defaultValue)
Construct a new formatter with the specified default value. |
|
String |
error(String msg)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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
convert in interface Converter<String,E extends Enum<E>>IllegalArgumentExceptionpublic String error(String msg)
error in interface Converter<String,E extends Enum<E>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||