PTLog API - 1.0

jp.ne.dti.lares.foozy.ptlog.format
Class DefaultFloatFormatter

java.lang.Object
  extended byjp.ne.dti.lares.foozy.ptlog.format.DefaultFloatFormatter
All Implemented Interfaces:
FloatFormatter

public class DefaultFloatFormatter
extends java.lang.Object
implements FloatFormatter

Default implementation.

This uses Float#toString(double) to format specified value.


Field Summary
static DefaultFloatFormatter INSTANCE
          For convenience to format float value.
 
Constructor Summary
DefaultFloatFormatter()
          Constructor.
 
Method Summary
 java.lang.String format(float value)
          Format specified value.
 java.lang.String format(java.lang.Float value)
          Format specified value.
 ObjectFormatter forObject()
          Get object which adapts "this" to ObjectFormatter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final DefaultFloatFormatter INSTANCE
For convenience to format float value.

Constructor Detail

DefaultFloatFormatter

public DefaultFloatFormatter()
Constructor.

Method Detail

forObject

public final ObjectFormatter forObject()
Get object which adapts "this" to ObjectFormatter.

This is useful to get ObjectFormatter which formats value in as same manner as format(Float) of "this".

This adaptation is done even if you override format(Float) in derived classes.

See Also:
DefaultUniversalFormatter.addObjectFormatter(jp.ne.dti.lares.foozy.ptlog.format.ObjectFormatter)

format

public java.lang.String format(float value)
Description copied from interface: FloatFormatter
Format specified value.

Specified by:
format in interface FloatFormatter

format

public java.lang.String format(java.lang.Float value)
Description copied from interface: FloatFormatter
Format specified value.

Specified by:
format in interface FloatFormatter

PTLog API - 1.0