Interface Util.PrintfSpec

  • Enclosing class:
    Util

    public static interface Util.PrintfSpec
    An interface for use with Util.printf to specialize behavior. Implementing printSpec allows % escape sequences to be handled in an individual way.
    • Method Detail

      • printSpec

        boolean printSpec​(StringBuffer buf,
                          char formatChar)
        Specializes the behavior of printf for % escape characters. Given a character, appends the replacement of that escape character to the given buffer, if the escape character can be handled. Otherwise, does nothing.
        Parameters:
        buf - the buffer to append the result to
        formatChar - the escape character being replaced
        Returns:
        true if the character was handled