Package org.fastnate.data.properties
Class BooleanConverter
java.lang.Object
org.fastnate.data.properties.BooleanConverter
- All Implemented Interfaces:
Function<String,,Boolean> PropertyConverter<Boolean>
public class BooleanConverter
extends Object
implements PropertyConverter<Boolean>, Function<String,Boolean>
Converts a string in an import file to a
Boolean.
Possible values that evaluate to true (matching is case insensitive):
- true
- 1
- on
- x
- y* (= yes - English)
- s* (= sí - Spanish, Italian, sim - Portuguese)
- o* (= oui - French)
- j* (= ja - German)
- д* (= да - Russian)
- Author:
- Tobias Liefke
-
Constructor Details
-
BooleanConverter
public BooleanConverter()
-
-
Method Details
-
apply
-
convert
Description copied from interface:PropertyConverterConverts a value from import file to Java.- Specified by:
convertin interfacePropertyConverter<Boolean>- Parameters:
targetType- the type of the target propertyvalue- the value in the import file- Returns:
- the value in Java
-