com.ancientprogramming.fixedformat4j.format.impl
Class ByTypeFormatter

java.lang.Object
  extended by com.ancientprogramming.fixedformat4j.format.impl.ByTypeFormatter
All Implemented Interfaces:
FixedFormatter

public class ByTypeFormatter
extends java.lang.Object
implements FixedFormatter

Formatter capable of formatting a bunch of known java standard library classes. So far: String, Integer, Long, Date, Character, Boolean, Double, Float and BigDecimal

Since:
1.0.0
Author:
Jacob von Eyben - http://www.ancientprogramming.com

Constructor Summary
ByTypeFormatter(FormatContext context)
           
 
Method Summary
 FixedFormatter actualFormatter(java.lang.Class<? extends java.lang.Object> dataType)
           
 java.lang.String format(java.lang.Object value, FormatInstructions instructions)
           
 java.lang.Object parse(java.lang.String value, FormatInstructions instructions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByTypeFormatter

public ByTypeFormatter(FormatContext context)
Method Detail

parse

public java.lang.Object parse(java.lang.String value,
                              FormatInstructions instructions)
Specified by:
parse in interface FixedFormatter

format

public java.lang.String format(java.lang.Object value,
                               FormatInstructions instructions)
Specified by:
format in interface FixedFormatter

actualFormatter

public FixedFormatter actualFormatter(java.lang.Class<? extends java.lang.Object> dataType)


Copyright © 2008 ancientprogramming.com. All Rights Reserved.