01: package org.geotools.geometry.jts;
02:
03: import java.awt.geom.PathIterator;
04: import java.util.logging.Logger;
05:
06: /**
07: * Subclass that provides a convenient efficient currentSegment(float[] coords)
08: * implementation that reuses always the same double array. This class and the
09: * associated subclasses are not thread safe.
10: *
11: * @author Andrea Aime
12: * @source $URL:
13: */
14: public abstract class AbstractLiteIterator implements PathIterator {
15:
16: /** The logger for the rendering module. */
17: private static final Logger LOGGER = org.geotools.util.logging.Logging
18: .getLogger("org.geotools.rendering");
19:
20: protected double[] dcoords = new double[2];
21:
22: /**
23: * @see java.awt.geom.PathIterator#currentSegment(float[])
24: */
25: public int currentSegment(float[] coords) {
26: int result = currentSegment(dcoords);
27: coords[0] = (float) dcoords[0];
28: coords[1] = (float) dcoords[1];
29:
30: return result;
31: }
32:
33: }
|