com.tngtech.jgiven.format
Class DefaultFormatter<T>
java.lang.Object
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.
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 |
DefaultFormatter
public DefaultFormatter()
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 formatformatterArguments
- optional arguments for the formatter to control the formatting.
- Returns:
- a formatted string
Copyright © 2014 TNG Technology Consulting. All rights reserved.