org.apache.jmeter.report.core

## Class Converters

- java.lang.Object
- - org.apache.jmeter.report.core.Converters

-     public final class Converters
      extends Object

  The class Converters provides converters of string.
  Since:
    3.0

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T` | `convert(Class<T> clazz, String value)` Converts the specified value to the destination type
    `static <T> StringConverter<T>` | `getConverter(Class<T> clazz)` Gets the converter for the specified class.

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

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

- - ### Method Detail

    - #### getConverter

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

      Gets the converter for the specified class.
      Type Parameters:
        `T` - the target type
      Parameters:
        `clazz` - the target class
      Returns:
        the converter

    - #### convert

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

      Converts the specified value to the destination type
      Type Parameters:
        `T` - the target type
      Parameters:
        `clazz` - the target class
        `value` - the value to convert
      Returns:
        the converted value
      Throws:
        `ConvertException` - when the conversion failed

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.