Parser to Collect all Editors
In conjunction with the descriptor in Example 7.3, “Callbacks to Collect and Filter Beans�, the Java code shown in Example 7.4, “A Parser to Collect all Editors� shows a Parser which collects all Editors. Example 7.4. A Parser to Collect all Editors public class Parser { private Set editors = new HashSet(); ... public void addEditor(Editor editor) { editors.add(editor); } public void removeEditor(Editor editor) { editors.remove(editor); } }