Class PrintfFormatter

java.lang.Object
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 Details

    • PrintfFormatter

      public PrintfFormatter()
  • Method Details

    • 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