[Pixelle-commit] SF.net SVN: pixelle:[183] trunk/pixelle/src/com/mebigfatguy/pixelle/ PixelleTransf
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-11-14 16:45:50
|
Revision: 183
http://pixelle.svn.sourceforge.net/pixelle/?rev=183&view=rev
Author: dbrosius
Date: 2008-11-14 16:45:44 +0000 (Fri, 14 Nov 2008)
Log Message:
-----------
use EnumMap for algorithm
Modified Paths:
--------------
trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleTransformer.java
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleTransformer.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleTransformer.java 2008-11-14 16:44:57 UTC (rev 182)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/PixelleTransformer.java 2008-11-14 16:45:44 UTC (rev 183)
@@ -24,7 +24,7 @@
import java.io.IOException;
import java.security.AccessController;
import java.security.PrivilegedAction;
-import java.util.HashMap;
+import java.util.EnumMap;
import java.util.Map;
import org.antlr.runtime.ANTLRStringStream;
@@ -59,7 +59,7 @@
* @return a set of transformation algorithms
*/
public static Map<PixelleComponent, String> getSampleTransform() {
- Map<PixelleComponent, String> algorithms = new HashMap<PixelleComponent, String>();
+ Map<PixelleComponent, String> algorithms = new EnumMap<PixelleComponent, String>(PixelleComponent.class);
algorithms.put(PixelleComponent.RED, "x");
algorithms.put(PixelleComponent.GREEN, "y");
algorithms.put(PixelleComponent.BLUE, "abs((width/2) - x)");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|