Class StringToShortConverter

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

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

    • StringToShortConverter

      public StringToShortConverter()
  • 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,Short>
    • 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,Short>
    • convert

      public Short 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,Short>
      Parameters:
      source - the object to convert
      Returns:
      the converted object