Documentation of 'us.bpsm.edn.printer.Printer' Java class
Printer
us.bpsm.edn.printer

Interface Printer



  • public interface Printer
    A Printer knows how to print edn values in edn syntax to an underlying stream of characters. Use Printers to create new Printers.

    Printer is mutable, stateful and should only be used form a single thread.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface and Description
      static interface  Printer.Fn<E> 
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      Printer append(char c)
      Append the given character to the underlying character stream.
      Printer append(java.lang.CharSequence csq)
      Append the given characters to the underlying character stream.
      void close()
      Close the underlying sequence of characters.
      Printer printValue(java.lang.Object ednValue)
      Print ednValue in edn syntax to the underlying character stream.
      Printer softspace()
      Increment the internal softspace counter.
    • Method Detail

      • printValue

        Printer printValue(java.lang.Object ednValue)
        Print ednValue in edn syntax to the underlying character stream.
        Parameters:
        ednValue - some value to be printed.
        Returns:
        this Printer (for method chaining)
        Throws:
        EdnException - if the printer does not know how to print values of the type of ednValue.
      • append

        Printer append(java.lang.CharSequence csq)
        Append the given characters to the underlying character stream.
        Parameters:
        csq - characters to append to the underlying stream.
        Returns:
        this Printer (for method chaining)
      • append

        Printer append(char c)
        Append the given character to the underlying character stream.
        Parameters:
        c - character to append to the underlying stream.
        Returns:
        this Printer (for method chaining)
      • softspace

        Printer softspace()
        Increment the internal softspace counter. Appending via append() will check this counter and insert a space if the counter is greater than 1 before resetting the counter to zero.

        This is used by implementations of Printer.Fn to assure that spaces are inserted where they are necessary to enable unambiguous parsing. For example: between two symbols.

        Returns:
        this Printer (for method chaining)
      • close

        void close()
        Close the underlying sequence of characters.
        Throws:
        EdnIOException - if the underlying sequence of characters is Closeable and the attempt to close it fails.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.