Class Appendables


  • public class Appendables
    extends java.lang.Object
    Utilities for working with Appendable objects.
    Author:
    Garret Wilson
    See Also:
    Appendable
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <A extends java.lang.Appendable>
      A
      append​(A appendable, char character, int count)
      Appends a given repetition of characters to an appendable.
      • Methods inherited from class java.lang.Object

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

      • append

        public static <A extends java.lang.Appendable> A append​(A appendable,
                                                                char character,
                                                                int count)
                                                         throws java.io.IOException
        Appends a given repetition of characters to an appendable.
        Type Parameters:
        A - The appendable class.
        Parameters:
        appendable - The appendable to which the characters should be appended.
        character - The character to append.
        count - The number of repetitions of the character.
        Returns:
        The appendable with the appended repetitions of the character.
        Throws:
        java.lang.NullPointerException - if the given appendable is null.
        java.io.IOException - if there is an error appending to the appendable.