Class ToStringFormatter<T>

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

public class ToStringFormatter<T> extends Object implements Formatter<T>
A simple Formatter falling back to the objects toString() method.
  • Constructor Details

    • ToStringFormatter

      public ToStringFormatter()
    • ToStringFormatter

      public ToStringFormatter(String nullString)
  • Method Details

    • format

      public String format(T obj)
      Description copied from interface: Formatter
      Create a string representation for the given object.
      Specified by:
      format in interface Formatter<T>
      Parameters:
      obj - the object to format
      Returns:
      a string describing the object