com.tngtech.jgiven.format
Class PrintfFormatter

java.lang.Object
  extended by com.tngtech.jgiven.format.PrintfFormatter
All Implemented Interfaces:
ArgumentFormatter<Object>

public class PrintfFormatter
extends Object
implements ArgumentFormatter<Object>

Formatter to use a Java format string to format arguments.


Constructor Summary
PrintfFormatter()
           
 
Method Summary
 String format(Object o, String... args)
          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

PrintfFormatter

public PrintfFormatter()
Method Detail

format

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

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


Copyright © 2014 TNG Technology Consulting. All rights reserved.