Class ConvertFrenchToBoolean<T,I>

java.lang.Object
com.opencsv.bean.AbstractBeanField<T,I>
com.opencsv.bean.customconverter.ConverterLanguageToBoolean<T,I>
com.opencsv.bean.customconverter.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 Details

  • Constructor Details

    • ConvertFrenchToBoolean

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

    • getLocalizedTrue

      protected 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 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 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 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