com.ancientprogramming.fixedformat4j.format.impl
Class AbstractNumberFormatter<T>

java.lang.Object
  extended by com.ancientprogramming.fixedformat4j.format.AbstractFixedFormatter<T>
      extended by com.ancientprogramming.fixedformat4j.format.impl.AbstractNumberFormatter<T>
All Implemented Interfaces:
FixedFormatter<T>
Direct Known Subclasses:
AbstractDecimalFormatter, IntegerFormatter, LongFormatter

public abstract class AbstractNumberFormatter<T>
extends AbstractFixedFormatter<T>

Apply signing to values

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

Constructor Summary
AbstractNumberFormatter()
           
 
Method Summary
 java.lang.String format(T obj, FormatInstructions instructions)
          Override and applies signing instead of align.
 T parse(java.lang.String value, FormatInstructions instructions)
          Override and applies signing instead of align.
 
Methods inherited from class com.ancientprogramming.fixedformat4j.format.AbstractFixedFormatter
asObject, asString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNumberFormatter

public AbstractNumberFormatter()
Method Detail

parse

public T parse(java.lang.String value,
               FormatInstructions instructions)
Override and applies signing instead of align.

Specified by:
parse in interface FixedFormatter<T>
Overrides:
parse in class AbstractFixedFormatter<T>
Parameters:
value - the value
instructions - the instructions
Returns:
the parsed object

format

public java.lang.String format(T obj,
                               FormatInstructions instructions)
Override and applies signing instead of align.

Specified by:
format in interface FixedFormatter<T>
Overrides:
format in class AbstractFixedFormatter<T>
Parameters:
obj - the object to format
instructions - the instructions
Returns:
the raw value


Copyright © 2008 ancientprogramming.com. All Rights Reserved.