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
Fields -
Constructor Summary
Constructors -
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:ArgumentFormatterFormat a single argument by taking optional formatter arguments into account.- Specified by:
formatin 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:FormatterFormats a step method argument. -
format
- Specified by:
formatin interfaceObjectFormatter<T>
-