java.lang.Object
org.meeuw.configuration.spi.EnumToString
- All Implemented Interfaces:
Comparable<ToStringProvider<?>>,ToStringProvider<Enum<?>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromString(Class<?> type, @Nullable String value) Given a desired type, and a string value, convert it to the supported type.For given value, check if the type is supported, and then convert it to a String.intweight()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.meeuw.configuration.spi.ToStringProvider
compareTo
-
Constructor Details
-
EnumToString
public EnumToString()
-
-
Method Details
-
weight
public int weight()- Specified by:
weightin interfaceToStringProvider<Enum<?>>
-
toString
Description copied from interface:ToStringProviderFor given value, check if the type is supported, and then convert it to a String.- Specified by:
toStringin interfaceToStringProvider<Enum<?>>
-
fromString
Description copied from interface:ToStringProviderGiven a desired type, and a string value, convert it to the supported type. Normally, the given type must be some superclass ofC, but it also might be a primitive type.- Specified by:
fromStringin interfaceToStringProvider<Enum<?>>
-