Class PrintfFormatter

  • All Implemented Interfaces:
    ArgumentFormatter<java.lang.Object>

    public class PrintfFormatter
    extends java.lang.Object
    implements ArgumentFormatter<java.lang.Object>
    Formatter to use a Java format string to format arguments.
    • Constructor Summary

      Constructors 
      Constructor Description
      PrintfFormatter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String format​(java.lang.Object o, java.lang.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 java.lang.String format​(java.lang.Object o,
                                       java.lang.String... args)
        Description copied from interface: ArgumentFormatter
        Format a single argument by taking optional formatter arguments into account.
        Specified by:
        format in interface ArgumentFormatter<java.lang.Object>
        Parameters:
        o - the object to format
        args - optional arguments for the formatter to control the formatting.
        Returns:
        a formatted string