Class PositionalParameterStringFormatter


  • public final class PositionalParameterStringFormatter
    extends java.lang.Object
    Allows slf4j style formatting of parameters into a string.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String format​(java.lang.String source, java.lang.Object... parameters)
      Formats a string using slf4j style positional parameter replacement.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • format

        public static java.lang.String format​(java.lang.String source,
                                              java.lang.Object... parameters)
        Formats a string using slf4j style positional parameter replacement. Instances of "{}" in the source string are replaced in order by the specified parameter values as strings.
        Parameters:
        source - original string to format
        parameters - list of parameters that will be substituted
        Returns:
        formatted string