cucumber.runtime.converters
Class ConverterWithNumberFormat<T extends java.lang.Number>

java.lang.Object
  extended by cucumber.runtime.converters.ConverterWithFormat<T>
      extended by cucumber.runtime.converters.ConverterWithNumberFormat<T>
All Implemented Interfaces:
com.thoughtworks.xstream.converters.ConverterMatcher, com.thoughtworks.xstream.converters.SingleValueConverter
Direct Known Subclasses:
BigDecimalConverter, BigIntegerConverter, ByteConverter, DoubleConverter, FloatConverter, IntegerConverter, LongConverter, ShortConverter

public abstract class ConverterWithNumberFormat<T extends java.lang.Number>
extends ConverterWithFormat<T>


Constructor Summary
ConverterWithNumberFormat(java.util.Locale locale, java.lang.Class[] convertibleTypes)
           
 
Method Summary
protected abstract  T downcast(java.lang.Number argument)
           
 T fromString(java.lang.String string)
           
 java.util.List<java.text.NumberFormat> getFormats()
           
 
Methods inherited from class cucumber.runtime.converters.ConverterWithFormat
canConvert, toString, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterWithNumberFormat

public ConverterWithNumberFormat(java.util.Locale locale,
                                 java.lang.Class[] convertibleTypes)
Method Detail

fromString

public T fromString(java.lang.String string)
Specified by:
fromString in interface com.thoughtworks.xstream.converters.SingleValueConverter
Overrides:
fromString in class ConverterWithFormat<T extends java.lang.Number>

getFormats

public java.util.List<java.text.NumberFormat> getFormats()
Specified by:
getFormats in class ConverterWithFormat<T extends java.lang.Number>
Returns:
A Format to parse the argument

downcast

protected abstract T downcast(java.lang.Number argument)