| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
package org.locationtech.jts.geom; |
| 15 |
|
| 16 |
|
| 17 |
/** |
| 18 |
* <code>Geometry</code> classes support the concept of applying |
| 19 |
* a <code>GeometryComponentFilter</code> |
| 20 |
* filter to the <code>Geometry</code>. |
| 21 |
* The filter is applied to every component of the <code>Geometry</code> |
| 22 |
* which is itself a <code>Geometry</code> |
| 23 |
* and which does not itself contain any components. |
| 24 |
* (For instance, all the {@link LinearRing}s in {@link Polygon}s are visited, |
| 25 |
* but in a {@link MultiPolygon} the {@link Polygon}s themselves are not visited.) |
| 26 |
* Thus the only classes of Geometry which must be |
| 27 |
* handled as arguments to {@link #filter} |
| 28 |
* are {@link LineString}s, {@link LinearRing}s and {@link Point}s. |
| 29 |
* <p> |
| 30 |
* A <code>GeometryComponentFilter</code> filter can either |
| 31 |
* record information about the <code>Geometry</code> |
| 32 |
* or change the <code>Geometry</code> in some way. |
| 33 |
* <code>GeometryComponentFilter</code> |
| 34 |
* is an example of the Gang-of-Four Visitor pattern. |
| 35 |
* |
| 36 |
*@version 1.7 |
| 37 |
*/ |
| 38 |
public interface GeometryComponentFilter { |
| 39 |
|
| 40 |
/** |
| 41 |
* Performs an operation with or on <code>geom</code>. |
| 42 |
* |
| 43 |
*@param geom a <code>Geometry</code> to which the filter is applied. |
| 44 |
*/ |
| 45 |
void filter(Geometry geom); |
| 46 |
} |
| 47 |
|
| 48 |
|