Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/raster/ExternalIndexConverter.java @ 802:4abe172be970
Finished Javadoc of the raster package.
gnv-artifacts/trunk@884 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 07 Apr 2010 07:49:12 +0000 |
parents | c4156275c1e1 |
children | feae2f9d6c6f |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/raster/ExternalIndexConverter.java Tue Apr 06 16:53:43 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/raster/ExternalIndexConverter.java Wed Apr 07 07:49:12 2010 +0000 @@ -3,6 +3,9 @@ import org.apache.log4j.Logger; /** + * Converts the interal color index of a polygon to the external index + * defined by the corresponding palette entry. + * * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> */ public class ExternalIndexConverter @@ -11,15 +14,33 @@ private static Logger log = Logger.getLogger( ExternalIndexConverter.class); + /** + * The palette where to find the color indices. + */ protected Palette palette; + /** + * Default constructor. + */ public ExternalIndexConverter() { } + /** + * Constrcutor to create an ExternalIndexConverter with + * a given palette. + * @param palette The palette where to find the color indices. + */ public ExternalIndexConverter(Palette palette) { this.palette = palette; } + /** + * Maps the color index of a polygon to the external index + * defined by the corresponing palette entry. + * @param value The value to convert + * @return The mapped value or the original value if + * no corresponing palette entry was found. + */ public Integer convert(Integer value) { if (value == null) { return value;