Class StringToFloatConverter

java.lang.Object
org.craftercms.commons.converters.impl.StringToFloatConverter
All Implemented Interfaces:
Converter<String,Float>

public class StringToFloatConverter extends Object implements Converter<String,Float>
Converts String to Float.
Author:
avasquez
  • Constructor Details

    • StringToFloatConverter

      public StringToFloatConverter()
  • Method Details

    • getSourceClass

      public Class<?> getSourceClass()
      Description copied from interface: Converter
      Returns the class of the objects this converter converts from.
      Specified by:
      getSourceClass in interface Converter<String,Float>
    • getTargetClass

      public Class<?> getTargetClass()
      Description copied from interface: Converter
      Returns the class of the objects this converter converts to.
      Specified by:
      getTargetClass in interface Converter<String,Float>
    • convert

      public Float convert(String source)
      Description copied from interface: Converter
      Converts the source object from S type to T type.
      Specified by:
      convert in interface Converter<String,Float>
      Parameters:
      source - the object to convert
      Returns:
      the converted object