org.parboiled.support
Class ToStringFormatter<T>

java.lang.Object
  extended by org.parboiled.support.ToStringFormatter<T>
Type Parameters:
T -
All Implemented Interfaces:
Formatter<T>

public class ToStringFormatter<T>
extends java.lang.Object
implements Formatter<T>

A simple Formatter falling back to the objects toString() method.


Constructor Summary
ToStringFormatter()
           
ToStringFormatter(java.lang.String nullString)
           
 
Method Summary
 java.lang.String format(T obj)
          Create a string representation for the given obejct.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToStringFormatter

public ToStringFormatter()

ToStringFormatter

public ToStringFormatter(java.lang.String nullString)
Method Detail

format

public java.lang.String format(T obj)
Description copied from interface: Formatter
Create a string representation for the given obejct.

Specified by:
format in interface Formatter<T>
Parameters:
obj - the object to format
Returns:
a string describing the object