The workpiece assumes responsibility for saving or not, depending on its state.
Patterns in Java
Collections for States
Listing 3. The workpiece assumes responsibility for saving or not, depending on its state.
- By Kevlin Henney
- July 17, 2000
public abstract class Workpiece
public void save()
changed = false;
public class Application
public void saveChanges()
Iterator workpiece = changed.iterator();
Kevlin Henney is a Principal Technologist with QA Training in the UK.