cucumber.runtime.converters
Class TimeConverter<T>

java.lang.Object
  extended by cucumber.runtime.converters.ConverterWithFormat<T>
      extended by cucumber.runtime.converters.TimeConverter<T>
All Implemented Interfaces:
com.thoughtworks.xstream.converters.ConverterMatcher, com.thoughtworks.xstream.converters.SingleValueConverter
Direct Known Subclasses:
CalendarConverter, DateConverter

public abstract class TimeConverter<T>
extends ConverterWithFormat<T>


Field Summary
protected  Locale locale
           
 
Constructor Summary
TimeConverter(Locale locale, Class[] convertibleTypes)
           
 
Method Summary
protected  void add(DateFormat dateFormat)
           
protected  void addFormat(int style, Locale locale)
           
 List<? extends Format> getFormats()
           
static TimeConverter getInstance(ParameterType parameterType, Locale locale)
           
static List<Class> getTimeClasses()
           
 void removeOnlyFormat()
           
 void setOnlyFormat(String dateFormatString, Locale locale)
           
 
Methods inherited from class cucumber.runtime.converters.ConverterWithFormat
canConvert, fromString, toString, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locale

protected final Locale locale
Constructor Detail

TimeConverter

public TimeConverter(Locale locale,
                     Class[] convertibleTypes)
Method Detail

addFormat

protected void addFormat(int style,
                         Locale locale)

add

protected void add(DateFormat dateFormat)

getFormats

public List<? extends Format> getFormats()
Specified by:
getFormats in class ConverterWithFormat<T>
Returns:
A Format to parse the argument

setOnlyFormat

public void setOnlyFormat(String dateFormatString,
                          Locale locale)

removeOnlyFormat

public void removeOnlyFormat()

getInstance

public static TimeConverter getInstance(ParameterType parameterType,
                                        Locale locale)

getTimeClasses

public static List<Class> getTimeClasses()


Copyright © 2012. All Rights Reserved.