com.vaadin.data.util.converter.

Class StringToEnumConverter

  • All Implemented Interfaces:

    Converter<String,Enum>, Serializable


    public class StringToEnumConverter
    extends Object
    implements Converter<String,Enum>

    A converter that converts from String to an Enum and back.

    Designed to provide nice human readable strings for Enum classes conforming to one of these patterns:

    • The constants are named SOME_UPPERCASE_WORDS and there's no toString implementation.
    • toString() always returns the same human readable string that is not the same as its name() value. Each constant in the enum type returns a distinct toString() value.
    Will not necessarily work correctly for other cases.

    Since:

    7.4

    Author:

    Vaadin Ltd

    See Also:

    Serialized Form