Class Printable.Abstract

java.lang.Object
space.arim.dazzleconf.backend.Printable.Abstract
All Implemented Interfaces:
Printable
Enclosing interface:
Printable

public abstract static class Printable.Abstract extends Object implements Printable
A base implementation for Printable.

Usage is simple. Extend this class and implement the only required method, Printable.printTo(Appendable). This class implements the other "print" methods, as well as toString.

  • Constructor Details

    • Abstract

      public Abstract()
      Creates
  • Method Details

    • printString

      public final @NonNull String printString()
      Description copied from interface: Printable
      Gets the printed content as a string
      Specified by:
      printString in interface Printable
      Returns:
      printed string
    • printTo

      public final void printTo(@NonNull StringBuilder output)
      Description copied from interface: Printable
      Prints to the given builder
      Specified by:
      printTo in interface Printable
      Parameters:
      output - where to place the message
    • toString

      public final @NonNull String toString()
      Description copied from interface: Printable
      Gets a string representation.

      Implementations are strongly encouraged (but not required) to return the same value as fo Printable.printString()

      Specified by:
      toString in interface Printable
      Overrides:
      toString in class Object
      Returns:
      a string representation of this object