Module MaterialFX
Interface FunctionalStringConverter<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional alternative to
StringConverter.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> StringConverter<T>static <T> StringConverter<T>static <T> StringConverter<T>fromString(String s) static <T> StringConverter<T>default String
-
Method Details
-
fromString
-
toString
-
converter
- Returns:
- a new
StringConverterwhich uses the given function to convert a String to an object of type T
-
converter
static <T> StringConverter<T> converter(Function<String, T> fsFunction, Function<T, String> tsFunction) - Returns:
- a new
StringConverterwhich uses the given functions to convert a String to an object of type T and vice versa.
-
from
- Returns:
- a new
StringConverterwhich is only capable of converting a String to an object of type T - Throws:
UnsupportedOperationException- when using the toString(T) method
-
to
- Returns:
- a new
StringConverterwhich is only capable of converting an object of type T to a String - Throws:
UnsupportedOperationException- when using the fromString(String) method
-