Back to project page SeniorDesign.
The source code is released under:
GNU General Public License
If you think the Android project SeniorDesign listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package fakesetgame.seniordesign.model; //from ww w. j av a 2 s . co m import java.util.HashMap; import java.util.Map; /** * An enumeration of possible tile shadings. */ public enum Shading { Filled(1), Dashed(2), Hollow(3); private int numVal; private static Map<Integer, Shading> shadingMap = new HashMap<Integer, Shading>(); static{ for(Shading shadingEnum: Shading.values()){ shadingMap.put(shadingEnum.numVal, shadingEnum); } } private Shading(final int numVal){ this.numVal = numVal; } public int getNumVal(){ return numVal; } public static Shading valueOf(int numVal){ return shadingMap.get(numVal); } }