01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.event;
17:
18: /**
19: * Allows for processing of StyleDeltas.
20: *
21: * <p>
22: * Example Usage:
23: * <pre>
24: * class Visitor implements StyleDeltaVisitor {
25: * public boolean visit(StyleDelta delta) {
26: * switch (delta.getKind()) {
27: * case StyleDelta.Kind.ADDED :
28: * // handle added handled
29: * break;
30: * case StyleDelta.Kind.REMOVED :
31: * // handle removed handled
32: * break;
33: * case StyleDelta.Kind.CHANGED :
34: * // handle changed handled
35: * break;
36: * }
37: * return true; // visit children
38: * }
39: * }
40: * StyleDelta delta = styleEvent.getDelta();
41: * delta.accept(new Visitor());
42: * </pre>
43: * </p>
44: *
45: * @author Jody Garnett
46: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/event/GTDeltaVisitor.java $
47: */
48: public interface GTDeltaVisitor {
49: /**
50: * Visits the given delta.
51: *
52: * @param delta DOCUMENT ME!
53: *
54: * @return <code>true</code> if the delta's children should be visited;
55: * <code>false</code> if they should be skipped.
56: */
57: public boolean visit(GTDelta delta);
58: }
|