com.tngtech.jgiven.format
Class DefaultFormatter<T>

java.lang.Object
  extended by com.tngtech.jgiven.format.DefaultFormatter<T>
Type Parameters:
T -
All Implemented Interfaces:
ArgumentFormatter<T>

public class DefaultFormatter<T>
extends Object
implements ArgumentFormatter<T>

A default formatter that merely use String.valueOf(Object), except for arrays where Arrays.deepToString(Object[]) is used.


Constructor Summary
DefaultFormatter()
           
 
Method Summary
 String format(T argumentToFormat, String... formatterArguments)
          Format a single argument by taking optional formatter arguments into account.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFormatter

public DefaultFormatter()
Method Detail

format

public String format(T argumentToFormat,
                     String... formatterArguments)
Description copied from interface: ArgumentFormatter
Format a single argument by taking optional formatter arguments into account.

Specified by:
format in interface ArgumentFormatter<T>
Parameters:
argumentToFormat - the object to format
formatterArguments - optional arguments for the formatter to control the formatting.
Returns:
a formatted string


Copyright © 2014 TNG Technology Consulting. All rights reserved.