package com.geoway.pad.favourite.bean;
/** * @author likehua * @date 20120621 * */public enum FavouriteGeometeyType { POINT(1), LINE(2), POLYGON(2); int type; private FavouriteGeometeyType(int type){ this.type=type; } public int getOriginTypeValue(){ return this.type; } public static FavouriteGeometeyType parseGeometryType(int type){ if(type==1){ return FavouriteGeometeyType.POINT; }; if(type==2){ return FavouriteGeometeyType.LINE; }; if(type==3){ return FavouriteGeometeyType.POLYGON; }; return null; }; public static void main(String[] args){ // FavouriteGeometeyType type; System.out.println(FavouriteGeometeyType.parseGeometryType(1).ordinal()); System.out.println(FavouriteGeometeyType.parseGeometryType(1).getOriginTypeValue()); }}