Protokollierung mit Dekorator

Aufgabe:

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.



Johannes Waldmann 2007-06-13