01: package org.geotools.caching.quatree;
02:
03: import org.geotools.caching.spatialindex.spatialindex.IData;
04: import org.geotools.caching.spatialindex.spatialindex.INode;
05: import org.geotools.caching.spatialindex.spatialindex.IVisitor;
06:
07: public class ValidTileVisitor implements IVisitor {
08: protected boolean isCovered = false;
09: protected Node lastNode = null;
10:
11: public void visitData(IData d) {
12: // do nothing
13: }
14:
15: public void visitNode(INode n) {
16: if (n instanceof Node) {
17: Node node = (Node) n;
18: isCovered = isCovered || node.isValid();
19: lastNode = node;
20: }
21: }
22:
23: public boolean isCovered() {
24: return isCovered;
25: }
26:
27: public Node getLastNode() {
28: return lastNode;
29: }
30: }
|