org.apache.camel.dataformat.bindy.format
Class NumberPatternFormat<T>

java.lang.Object
  extended by org.apache.camel.dataformat.bindy.format.NumberPatternFormat<T>
All Implemented Interfaces:
Format<T>, PatternFormat<T>
Direct Known Subclasses:
BytePatternFormat, DoublePatternFormat, FloatPatternFormat, IntegerPatternFormat, LongPatternFormat, ShortPatternFormat

public abstract class NumberPatternFormat<T>
extends Object
implements PatternFormat<T>


Constructor Summary
NumberPatternFormat()
           
NumberPatternFormat(String pattern, Locale locale)
           
 
Method Summary
 String format(T object)
          Formats the object into a String
protected  NumberFormat getNumberFormat()
           
 String getPattern()
          Method used to retrieve the pattern for the format
 T parse(String string)
          Parses a String into an object
 void setPattern(String pattern)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberPatternFormat

public NumberPatternFormat()

NumberPatternFormat

public NumberPatternFormat(String pattern,
                           Locale locale)
Method Detail

format

public String format(T object)
              throws Exception
Description copied from interface: Format
Formats the object into a String

Specified by:
format in interface Format<T>
Parameters:
object - the object
Returns:
formatted as a String
Throws:
Exception - can be thrown

parse

public T parse(String string)
        throws Exception
Description copied from interface: Format
Parses a String into an object

Specified by:
parse in interface Format<T>
Parameters:
string - the string
Returns:
T the object
Throws:
Exception - can be thrown

getNumberFormat

protected NumberFormat getNumberFormat()

getPattern

public String getPattern()
Description copied from interface: PatternFormat
Method used to retrieve the pattern for the format

Specified by:
getPattern in interface PatternFormat<T>
Returns:
String the pattern

setPattern

public void setPattern(String pattern)


Apache CAMEL