Class 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 Detail

      • ToStringFormatter

        public ToStringFormatter()
      • ToStringFormatter

        public ToStringFormatter​(String nullString)
    • Method Detail

      • 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