anthill.util
Class Printable
java.lang.Object
|
+--anthill.util.Printable
- public class Printable
- extends Object
Classes extending Printable
automatically inherit
a toString()
method which prints out their contents.
i.e. the value of the fields contained in the object instances.
Note that toString()
in a Printable
object
may generate infinite loops if the reference graph obtained starting
from the object contains a cycle of Printable
objects.
- Version:
- $Revision: 1.4 $
- Author:
- Alberto Montresor
Method Summary |
String |
toString()
toString method to print out the content of
an object. |
String |
toString(String indent)
Auto-indenting, recursive toString() method to
print out the content of an object. |
Printable
public Printable()
toString
public String toString()
toString
method to print out the content of
an object.
- Overrides:
toString
in class Object
toString
public String toString(String indent)
- Auto-indenting, recursive
toString()
method to
print out the content of an object.