[all packages] [package ] [class hierarchy] [index]

public abstract class Printable

(source file: Printable.java)
java.lang.Object
   |
   +----Printable

The pure class interface.
public abstract class Printable
A class of printable terms.

Author:
Alan Jeffrey
Version: v1.0 1998/06/02

Constuctor Index

O Printable()

Methods

O debug()
Print out debugging information.
O print(Printer)
How to print this term
O printA(Printer)
Print the term as an atom (bracketed by default).
O printB(Printer)
Print the term with brackets round it.
O toString()
Convert the term to a string.

Constructors

O Printable
public Printable();

Methods

O print
public abstract void print(Printer p);
How to print this term. This is the only method which needs to be defined, all the others have default implementations.

Parameters:
p - where to print to.

O debug

public void debug();
Print out debugging information.

O printA

public void printA(Printer p);
Print the term as an atom (bracketed by default).

Parameters:
p - where to print to.

O printB

public void printB(Printer p);
Print the term with brackets round it.

Parameters:
p - where to print to.

O toString

public String toString();
Convert the term to a string.

Returns:
the result of printing the term into a string buffer, then converting the string buffer back to a string.
Overrides:
toString in class Object


[all packages] [package ] [class hierarchy] [index]
Printable.html