Package com.vaadin.flow.data.converter
Enum Class DefaultConverterFactory
- All Implemented Interfaces:
ConverterFactory,Serializable,Comparable<DefaultConverterFactory>,Constable
public enum DefaultConverterFactory
extends Enum<DefaultConverterFactory>
implements ConverterFactory
Default implementation of
ConverterFactory, handling all standard
converters defined in com.vaadin.flow.data.converters package.- Since:
- Author:
- Vaadin Ltd
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionnewInstance(Class<P> presentationType, Class<M> modelType) Attempts to create aConverterinstance, capable to handle conversion between the given presentation and model types.static DefaultConverterFactoryReturns the enum constant of this class with the specified name.static DefaultConverterFactory[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
newInstance
Description copied from interface:ConverterFactoryAttempts to create aConverterinstance, capable to handle conversion between the given presentation and model types. An emptyOptionalis returned if a conversion cannot be performed.- Specified by:
newInstancein interfaceConverterFactory- Type Parameters:
P- The presentation type.M- The model type.- Parameters:
presentationType- presentation type, not null.modelType- model type, not null.- Returns:
- a
Converterinstance wrapped into anOptional, or an emptyOptionalif no suitable converter is available.
-