Package com.tngtech.jgiven.format
Interface ArgumentFormatter<T>
-
- Type Parameters:
T
- the type of the object to format
- All Known Implementing Classes:
BooleanFormatter
,DateFormatter
,DefaultFormatter
,DefaultObjectFormatter
,NotFormatter
,PrintfFormatter
,StepFormatter.AnnotationBasedFormatter
public interface ArgumentFormatter<T>
Interface for defining custom argument formatter using theFormat
annotation.Note that in many cases it is more convenient to define a custom formatter annotation using the
AnnotationFormat
annotation and defining anAnnotationArgumentFormatter
.Alternatively you can also provide a global formatter for a type (see
Formatter
).- See Also:
Format
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
format(T argumentToFormat, java.lang.String... formatterArguments)
Format a single argument by taking optional formatter arguments into account.
-
-
-
Method Detail
-
format
java.lang.String format(T argumentToFormat, java.lang.String... formatterArguments)
Format a single argument by taking optional formatter arguments into account.- Parameters:
argumentToFormat
- the object to formatformatterArguments
- optional arguments for the formatter to control the formatting.- Returns:
- a formatted string
-
-