gnu.kawa.functions
Class DisplayFormat
java.lang.Object
java.text.Format
gnu.lists.AbstractFormat
gnu.kawa.functions.DisplayFormat
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- Print
public class DisplayFormat
- extends AbstractFormat
Handle formatted output for Lisp-like languages.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.text.Format |
java.text.Format.Field |
Constructor Summary |
DisplayFormat(boolean readable,
char language)
Create a new instance. |
Methods inherited from class java.text.Format |
clone, format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
outBase
public static final ThreadLocation outBase
- Fluid parameter to specify default output base for printing rationals.
outRadix
public static final ThreadLocation outRadix
- True if we should print a radix indicator when printing rationals.
The default is no; otherwise we follow Common Lisp conventions.
DisplayFormat
public DisplayFormat(boolean readable,
char language)
- Create a new instance.
- Parameters:
readable
- if output should be formatted so it could be read
back in again, for example strings shoudl be quoted.language
- the programming language style to use, where
'S' is Scheme, 'C' is Common Lisp, and 'E' is Emacs Lisp.
getEmacsLispFormat
public static DisplayFormat getEmacsLispFormat(boolean readable)
getCommonLispFormat
public static DisplayFormat getCommonLispFormat(boolean readable)
getSchemeFormat
public static DisplayFormat getSchemeFormat(boolean readable)
getReadableOutput
public boolean getReadableOutput()
writeBoolean
public void writeBoolean(boolean v,
Consumer out)
- Overrides:
writeBoolean
in class AbstractFormat
writeChar
public void writeChar(int v,
Consumer out)
- Overrides:
writeChar
in class AbstractFormat
writeList
public void writeList(LList value,
OutPort out)
writeObject
public void writeObject(java.lang.Object obj,
Consumer out)
- Specified by:
writeObject
in class AbstractFormat