public interface Printer
Printers to create new
Printers.
Printer is mutable, stateful and should only be used form a single thread.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Printer.Fn<E> |
| Modifier and Type | Method and Description |
|---|---|
Printer |
append(char c)
Append the given character to the underlying character stream.
|
Printer |
append(CharSequence csq)
Append the given characters to the underlying character stream.
|
void |
close()
Close the underlying sequence of characters.
|
Printer |
printValue(Object ednValue)
Print
ednValue in edn syntax to the underlying
character stream. |
Printer |
softspace()
Increment the internal softspace counter.
|
Printer printValue(Object ednValue)
ednValue in edn syntax to the underlying
character stream.ednValue - some value to be printed.EdnException - if the printer does not know how to print
values of the type of ednValue.Printer append(CharSequence csq)
csq - characters to append to the underlying stream.Printer append(char c)
c - character to append to the underlying stream.Printer softspace()
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.
void close()
EdnIOException - if the underlying sequence of characters is
Closeable and the attempt to close it fails.Copyright © 2019. All rights reserved.