de.caff.generics.converter

## Class StringToLongTypeConverter

- java.lang.Object
- - de.caff.generics.converter.StringToLongTypeConverter

- All Implemented Interfaces:
    FragileTypeConverter<java.lang.Long,java.lang.String>

      public class StringToLongTypeConverter
      extends java.lang.Object
      implements FragileTypeConverter<java.lang.Long,java.lang.String>

  Type converter which converts strings to long integers.

  It may throw a `TypeConverterException` wrapping a `NumberFormatException`. Null values will be passed through.

  Author:
    Rammi

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringToLongTypeConverter()` Constructor.
    `StringToLongTypeConverter(int radix)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Long` | `convert(java.lang.String object)` Convert an object to another type.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StringToLongTypeConverter

          public StringToLongTypeConverter(int radix)

      Constructor.
      Parameters:
        `radix` - radix to use for conversion

    - #### StringToLongTypeConverter

          public StringToLongTypeConverter()

      Constructor. This creates a base10 string to integer converter.

  - ### Method Detail

    - #### convert

          public java.lang.Long convert(java.lang.String object)
                                 throws TypeConverterException

      Convert an object to another type.
      Specified by:
        `convert` in interface `FragileTypeConverter<java.lang.Long,java.lang.String>`
      Parameters:
        `object` - object to convert
      Returns:
        target object
      Throws:
        `TypeConverterException` - if an exception was thrown during conversion