Package com.tngtech.jgiven.format
Class DefaultFormatter<T>
java.lang.Object
com.tngtech.jgiven.format.DefaultFormatter<T>
- All Implemented Interfaces:
ArgumentFormatter<T>
,Formatter<T>
,ObjectFormatter<T>
- Direct Known Subclasses:
DefaultObjectFormatter
public class DefaultFormatter<T>
extends Object
implements ArgumentFormatter<T>, Formatter<T>, ObjectFormatter<T>
A default formatter that merely use
String.valueOf(Object)
,
except for arrays where Arrays.deepToString(Object[])
is used.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionformat
(T argumentToFormat, Annotation... annotations) Formats a step method argument.Format a single argument by taking optional formatter arguments into account.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
DefaultFormatter
public DefaultFormatter()
-
-
Method Details
-
format
Description copied from interface:ArgumentFormatter
Format a single argument by taking optional formatter arguments into account.- Specified by:
format
in interfaceArgumentFormatter<T>
- Parameters:
argumentToFormat
- the object to formatformatterArguments
- optional arguments for the formatter to control the formatting.- Returns:
- a formatted string
-
format
Description copied from interface:Formatter
Formats a step method argument. -
format
- Specified by:
format
in interfaceObjectFormatter<T>
-