Class Converters

  • All Implemented Interfaces:

    
    public final class Converters
    
                        

    The class Converters provides converters of string.

    Since:

    3.0

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static <T> StringConverter<T> getConverter(Class<T> clazz) Gets the converter for the specified class.
      static <T> T convert(Class<T> clazz, String value) Converts the specified value to the destination type
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getConverter

         static <T> StringConverter<T> getConverter(Class<T> clazz)

        Gets the converter for the specified class.

        Parameters:
        clazz - the target class
        Returns:

        the converter

      • convert

         static <T> T convert(Class<T> clazz, String value)

        Converts the specified value to the destination type

        Parameters:
        clazz - the target class
        value - the value to convert
        Returns:

        the converted value