public class EnumPropertyType<E extends Enum<E>> extends Object implements PropertyType<E>
| Constructor and Description |
|---|
EnumPropertyType(@NotNull Class<E> enumType) |
| Modifier and Type | Method and Description |
|---|---|
E |
convert(@Nullable Object object,
@NotNull ConvertErrorRecorder errorRecorder)
Converts the given object (typically read from a property resource) to the given type, if possible.
|
static <E extends Enum<E>> |
of(@NotNull Class<E> type) |
@NotNull Object |
toExportValue(E value)
Converts the given value to its export value.
|
@NotNull public static <E extends Enum<E>> @NotNull EnumPropertyType<E> of(@NotNull @NotNull Class<E> type)
@Nullable public E convert(@Nullable @Nullable Object object, @NotNull @NotNull ConvertErrorRecorder errorRecorder)
PropertyTypeconvert in interface PropertyType<E extends Enum<E>>object - the object to converterrorRecorder - error recorder to register errors even if a valid value is returned@NotNull public @NotNull Object toExportValue(@NotNull E value)
PropertyTypePropertyType.convert(java.lang.Object, ch.jalu.configme.properties.convertresult.ConvertErrorRecorder).)toExportValue in interface PropertyType<E extends Enum<E>>value - the value to convertCopyright © 2016–2023 The AuthMe Team. All rights reserved.