search

Interface myphysicslab.lab.util.Printable

Provided By
All Known Subinterfaces
All Known Implementations

An object that has a minimal string representation via its #toStringShort method.

When writing a toString method, use toStringShort on objects that are Printable. This is mainly needed to avoid infinite loops, such as when an object prints a myphysicslab.lab.util.Subject or myphysicslab.lab.util.Observer.

This can also make printing an array of Printable objects more practical because we only print minimal identity information, rather than the full toString representation which would have too much information and be unreadable.

Instance Methods