Class NumberIntegerConverter<NumberType extends Number>

java.lang.Object
com.saperion.common.lang.conversion.primitive.NumberIntegerConverter<NumberType>
All Implemented Interfaces:
Converter<NumberType,Integer>

public class NumberIntegerConverter<NumberType extends Number> extends Object implements Converter<NumberType,Integer>
Converts Number to Integer by calling Number.intValue().
Author:
jschwarz
  • Constructor Details

    • NumberIntegerConverter

      public NumberIntegerConverter()
  • Method Details

    • convert

      public Integer convert(NumberType number)
      Description copied from interface: Converter
      Converts the specified object and returns the conversion result.

      Implementations have to accept null-values without throwing exceptions.

      Specified by:
      convert in interface Converter<NumberType extends Number,Integer>
      Parameters:
      number - object to convert
      Returns:
      the converted object