T
- Type of the bean to be manipulatedI
- Type of the index into multivalued fieldspublic abstract class ConverterLanguageToBoolean<T,I> extends AbstractBeanField<T,I>
converter, errorLocale, field, fieldAccess, required, type
Constructor and Description |
---|
ConverterLanguageToBoolean() |
Modifier and Type | Method and Description |
---|---|
protected Object |
convert(String value)
Converts localized text into a
Boolean . |
protected String |
convertToWrite(Object value)
This method takes the current value of the field in question in the bean
passed in and converts it to a string.
|
protected abstract String[] |
getAllLocalizedFalseValues()
This represents a list of all values accepted as "false".
|
protected abstract String[] |
getAllLocalizedTrueValues()
This represents a list of all values accepted as "true".
|
protected abstract String |
getLocalizedFalse()
This is the string for "false" in the localized language.
|
protected abstract String |
getLocalizedTrue()
This is the string for "true" in the localized language.
|
assignValueToField, getErrorLocale, getField, getFieldValue, getType, indexAndSplitMultivaluedField, isFieldEmptyForWrite, isRequired, setErrorLocale, setField, setFieldValue, setRequired, setType, write
protected abstract String getLocalizedTrue()
true
in this languageprotected abstract String getLocalizedFalse()
false
in this languageprotected abstract String[] getAllLocalizedTrueValues()
protected abstract String[] getAllLocalizedFalseValues()
protected Object convert(String value) throws CsvDataTypeMismatchException
Boolean
.
The comparisons are case-insensitive.convert
in class AbstractBeanField<T,I>
value
- String that should represent a BooleanCsvDataTypeMismatchException
- If anything other than the
explicitly translated pairs is foundprotected String convertToWrite(Object value) throws CsvDataTypeMismatchException
convertToWrite
in class AbstractBeanField<T,I>
value
- The contents of the field currently being processed from the
bean to be written. Can be null if the field is not marked as required.CsvDataTypeMismatchException
- If the field is not a boolean
or Boolean
AbstractBeanField.write(java.lang.Object, java.lang.Object)
Copyright © 2005–2023. All rights reserved.