Pattern: Memento, java flavour