Aufgabe:
Zahl.compareTo protokollieren...
Lösung: eine Klasse dazwischenschieben
class Log<E> ... {
private final contents E;
int compareTo(Log<E> that) { .. }
}
Log<Zahl> a [] =
{ new Log<Zahl> (new Zahl (13)), .. };
Diese Klasse heißt Dekorator, das ist ein Beispiel für ein Entwurfsmuster.