Class ConvertFrenchToBoolean<T,​I>

  • Type Parameters:
    T - Type of the bean to be manipulated
    I - Type of the index into multivalued fields
    All Implemented Interfaces:
    BeanField<T,​I>

    public class ConvertFrenchToBoolean<T,​I>
    extends ConverterLanguageToBoolean<T,​I>
    This class converts common French representations of boolean values into a Boolean. This class also demonstrates how to localize booleans for any other language.
    Since:
    5.4
    • Field Detail

      • TRUE_STRINGS

        private static final java.lang.String[] TRUE_STRINGS
      • FALSE_STRINGS

        private static final java.lang.String[] FALSE_STRINGS
    • Constructor Detail

      • ConvertFrenchToBoolean

        public ConvertFrenchToBoolean()
        Silence code style checker by adding a useless constructor.
    • Method Detail

      • getLocalizedTrue

        protected java.lang.String getLocalizedTrue()
        Description copied from class: ConverterLanguageToBoolean
        This is the string for "true" in the localized language. This value will be used on converting from a boolean to a string.
        Specified by:
        getLocalizedTrue in class ConverterLanguageToBoolean<T,​I>
        Returns:
        The canonical name of true in this language
      • getLocalizedFalse

        protected java.lang.String getLocalizedFalse()
        Description copied from class: ConverterLanguageToBoolean
        This is the string for "false" in the localized language. This value will be used on converting from a boolean to a string.
        Specified by:
        getLocalizedFalse in class ConverterLanguageToBoolean<T,​I>
        Returns:
        The canonical name of false in this language
      • getAllLocalizedTrueValues

        protected java.lang.String[] getAllLocalizedTrueValues()
        Description copied from class: ConverterLanguageToBoolean
        This represents a list of all values accepted as "true". Any language will have more than one way to say "true", such as "yes", "y", or "1". This array should list all possibilities. Comparison is done in a case-insensitive fashion.
        Specified by:
        getAllLocalizedTrueValues in class ConverterLanguageToBoolean<T,​I>
        Returns:
        An array of all "true" strings
      • getAllLocalizedFalseValues

        protected java.lang.String[] getAllLocalizedFalseValues()
        Description copied from class: ConverterLanguageToBoolean
        This represents a list of all values accepted as "false". Any language will have more than one way to say "false", such as "no", "n", or "0". This array should list all possibilities. Comparison is done in a case-insensitive fashion.
        Specified by:
        getAllLocalizedFalseValues in class ConverterLanguageToBoolean<T,​I>
        Returns:
        An array of all "false" strings