Class BooleanTypeConverter

  • All Implemented Interfaces:
    TypeConverter<java.lang.String,​java.lang.Boolean>

    public class BooleanTypeConverter
    extends java.lang.Object
    implements TypeConverter<java.lang.String,​java.lang.Boolean>
    Boolean type converter : converts "true" , "1", "yes" and "on" (ignoring case) to the boolean true value. Any other value will be converted to false.
    Author:
    Mahmoud Ben Hassine ([email protected])
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Boolean convert​(java.lang.String value)
      Convert a source type into a target type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BooleanTypeConverter

        public BooleanTypeConverter()
    • Method Detail

      • convert

        public java.lang.Boolean convert​(java.lang.String value)
        Convert a source type into a target type.
        Specified by:
        convert in interface TypeConverter<java.lang.String,​java.lang.Boolean>
        Parameters:
        value - the input value to convert
        Returns:
        The converted value