org.databene.commons.converter
Class String2TimeConverter

java.lang.Object
  extended by org.databene.commons.converter.AbstractConverter<S,T>
      extended by org.databene.commons.converter.ThreadSafeConverter<java.lang.String,java.sql.Time>
          extended by org.databene.commons.converter.String2TimeConverter
All Implemented Interfaces:
java.lang.Cloneable, Converter<java.lang.String,java.sql.Time>, ThreadAware

public class String2TimeConverter
extends ThreadSafeConverter<java.lang.String,java.sql.Time>

Parses a String as a time value.

Created: 14.03.2008 22:15:58

Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.commons.converter.AbstractConverter
sourceType, targetType
 
Constructor Summary
String2TimeConverter()
           
String2TimeConverter(java.lang.String pattern)
           
 
Method Summary
 java.sql.Time convert(java.lang.String sourceValue)
          Concerts an object of type S to an object of type T
static java.sql.Time parse(java.lang.String value)
           
static java.sql.Time parse(java.lang.String value, java.lang.String pattern)
           
 
Methods inherited from class org.databene.commons.converter.ThreadSafeConverter
clone, isParallelizable, isThreadSafe
 
Methods inherited from class org.databene.commons.converter.AbstractConverter
getSourceType, getTargetType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

String2TimeConverter

public String2TimeConverter()

String2TimeConverter

public String2TimeConverter(java.lang.String pattern)
Method Detail

convert

public java.sql.Time convert(java.lang.String sourceValue)
                      throws ConversionException
Description copied from interface: Converter
Concerts an object of type S to an object of type T

Parameters:
sourceValue - the object to convert
Returns:
the converted object
Throws:
ConversionException - if the conversion fails

parse

public static java.sql.Time parse(java.lang.String value)
                           throws ConversionException
Throws:
ConversionException

parse

public static java.sql.Time parse(java.lang.String value,
                                  java.lang.String pattern)
                           throws ConversionException
Throws:
ConversionException


Copyright © 2010. All Rights Reserved.