anthill.util
Class Printable

java.lang.Object
  |
  +--anthill.util.Printable
Direct Known Subclasses:
GeneticFrameworkImpl

public class Printable
extends java.lang.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$
Author:
Alberto Montresor

Constructor Summary
Printable()
           
 
Method Summary
 java.lang.String toString()
          toString method to print out the content of an object.
 java.lang.String toString(java.lang.String indent)
          Auto-indenting, recursive toString() method to print out the content of an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Printable

public Printable()
Method Detail

toString

public java.lang.String toString()
toString method to print out the content of an object.
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(java.lang.String indent)
Auto-indenting, recursive toString() method to print out the content of an object.