Class StringToBoolean
java.lang.Object
org.springframework.binding.convert.converters.StringToObject
org.springframework.binding.convert.converters.StringToBoolean
- All Implemented Interfaces:
Converter,TwoWayConverter
Converts a textual representation of a boolean object to a
Boolean instance.- Author:
- Keith Donald
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a text boolean converter that parses standard true and false strings.StringToBoolean(String trueString, String falseString) Create a text to boolean converter that takes specific string representations of true and false into account. -
Method Summary
Methods inherited from class org.springframework.binding.convert.converters.StringToObject
convertSourceToTargetClass, convertTargetToSourceClass, getSourceClass, getTargetClass
-
Constructor Details
-
StringToBoolean
public StringToBoolean()Create a text boolean converter that parses standard true and false strings. -
StringToBoolean
Create a text to boolean converter that takes specific string representations of true and false into account.- Parameters:
trueString- special true string to usefalseString- special false string to use
-
-
Method Details
-
toObject
- Specified by:
toObjectin classStringToObject
-
toString
- Specified by:
toStringin classStringToObject
-