Interface StringConverter<T>
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
DateToLongConverter
,StringConverter.DefaultConverter
@ThreadSafe public interface StringConverter<T> extends java.io.Serializable
A converter between a specified java type andString
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
StringConverter.DefaultConverter
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
asString(T what)
Convert type to string.T
fromString(java.lang.String what)
Convert type from string.static StringConverter<java.lang.String>
getDefault()
T
max()
Retrieve maximal element.T
min()
Retrieve minimal element
-
-
-
Method Detail
-
getDefault
static StringConverter<java.lang.String> getDefault()
-
asString
java.lang.String asString(T what)
Convert type to string.- Parameters:
what
- input type- Returns:
- string representation of what
-
fromString
T fromString(java.lang.String what)
Convert type from string.- Parameters:
what
- string representation- Returns:
- the original object
-
max
T max()
Retrieve maximal element.- Returns:
- instance of maximal object
-
min
T min()
Retrieve minimal element- Returns:
- instance of minimal object
-
-