net.sourceforge.stripes.format
Class ObjectFormatter

java.lang.Object
  extended by net.sourceforge.stripes.format.ObjectFormatter
All Implemented Interfaces:
Formatter<Object>

public class ObjectFormatter
extends Object
implements Formatter<Object>

This is the default formatter. It simply calls String.valueOf() on the object being formatted.

Since:
Stripes 1.5
Author:
Aaron Porter

Constructor Summary
ObjectFormatter()
           
 
Method Summary
 String format(Object input)
          Converts the supplied parameter to a string using String.valueOf().
 void init()
          Does nothing.
 void setFormatPattern(String formatPattern)
          Does nothing.
 void setFormatType(String formatType)
          Does nothing.
 void setLocale(Locale locale)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectFormatter

public ObjectFormatter()
Method Detail

format

public String format(Object input)
Converts the supplied parameter to a string using String.valueOf().

Specified by:
format in interface Formatter<Object>
Parameters:
input - an object of a type that the formatter knows how to format
Returns:
String.valueOf(input)

init

public void init()
Does nothing.

Specified by:
init in interface Formatter<Object>

setFormatPattern

public void setFormatPattern(String formatPattern)
Does nothing.

Specified by:
setFormatPattern in interface Formatter<Object>

setFormatType

public void setFormatType(String formatType)
Does nothing.

Specified by:
setFormatType in interface Formatter<Object>

setLocale

public void setLocale(Locale locale)
Does nothing.

Specified by:
setLocale in interface Formatter<Object>


? Copyright 2005-2006, Stripes Development Team.