Class CharacterConverter

java.lang.Object
org.apache.commons.beanutils2.converters.AbstractConverter<Character>
org.apache.commons.beanutils2.converters.CharacterConverter
All Implemented Interfaces:
Converter<Character>

public final class CharacterConverter extends AbstractConverter<Character>
Converter implementation that handles conversion to and from java.lang.Character objects.

Can be configured to either return a default value or throw a ConversionException if a conversion error occurs.

Since:
1.3
  • Constructor Details

    • CharacterConverter

      Constructs a java.lang.Character Converter that throws a ConversionException if an error occurs.
    • CharacterConverter

      public CharacterConverter(char defaultValue)
      Constructs a java.lang.Character Converter that returns a default value if an error occurs.
      Parameters:
      defaultValue - The default value to be returned if the value to be converted is missing or an error occurs converting the value.
    • CharacterConverter

      public CharacterConverter(Character defaultValue)
      Constructs a java.lang.Character Converter that returns a default value if an error occurs.
      Parameters:
      defaultValue - The default value to be returned if the value to be converted is missing or an error occurs converting the value.
  • Method Details