Package org.apache.commons.beanutils2.sql.converters.locale

# Class SqlTimeLocaleConverter

java.lang.Object
org.apache.commons.beanutils2.locale.BaseLocaleConverter<Time>
org.apache.commons.beanutils2.locale.converters.DateLocaleConverter<Time>
org.apache.commons.beanutils2.sql.converters.locale.SqlTimeLocaleConverter

All Implemented Interfaces:
  `Converter<Time>`, `LocaleConverter<Time>`

public class SqlTimeLocaleConverter extends DateLocaleConverter<Time>
Standard `LocaleConverter` implementation that converts an incoming locale-sensitive String into a `Time` object, optionally using a default value or throwing a `ConversionException` if a conversion error occurs.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `SqlTimeLocaleConverter.Builder`
  Builds instances of `SqlTimeLocaleConverter`.

- ## Field Summary

  ### Fields inherited from class org.apache.commons.beanutils2.locale.BaseLocaleConverter

  `defaultValue, locale, localizedPattern, pattern, useDefault`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static SqlTimeLocaleConverter.Builder`
  `builder()`
  Constructs a new builder.
  `protected Time`
  `parse(Object value, String pattern)`
  Converts the specified locale-sensitive input object into an output object of the specified type.

  ### Methods inherited from class org.apache.commons.beanutils2.locale.converters.DateLocaleConverter

  `isLenient`

  ### Methods inherited from class org.apache.commons.beanutils2.locale.BaseLocaleConverter

  `convert, convert, convert, convert`

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

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

- ## Method Details

  - ### builder

    public static SqlTimeLocaleConverter.Builder builder()
    Constructs a new builder.
    Returns:
      a new builder.

  - ### parse

    protected Time parse(Object value, String pattern) throws ParseException
    Converts the specified locale-sensitive input object into an output object of the specified type.
    Overrides:
      `parse` in class `DateLocaleConverter<Time>`
    Parameters:
      `value` - The input object to be converted
      `pattern` - The pattern is used for the conversion
    Returns:
      The converted value
    Throws:
      `ConversionException` - if conversion cannot be performed successfully
      `ParseException` - if an error occurs parsing a String to a Number