少年阿賓

          那些青春的歲月

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            500 Posts :: 0 Stories :: 135 Comments :: 0 Trackbacks
          package com.abin.lee.collection.inner;
          public class XiXiang {
          public static enum IdType{
          ONE("one"),TWO("two"),THREE("three");
          private String textVal;
          private IdType(String textVal){
          this.textVal=textVal;
          }
          private String getString(){
          return textVal;
          }
          }
          public static String get(IdType type,String id){
          String status=null;
          final class get{
          String result=null;
          public String getName(String id){
          if(id.equals("1")){
          result="lee";
          }
          return result;
          }
          }
          if(type==IdType.valueOf("ONE")){
          status=new get().getName(id);
          }
          return status;
          }
          public static void main(String[] args) {
          String id="1";
          IdType type=IdType.valueOf("ONE");
          String result=new XiXiang().get(type,id);
          System.out.println("result="+result);
          }
          }
          posted on 2012-09-02 18:00 abin 閱讀(2381) 評論(0)  編輯  收藏 所屬分類: Java內部類JavaEnum
          主站蜘蛛池模板: 天气| 宜宾县| 滨州市| 穆棱市| 瑞昌市| 吴江市| 凤庆县| 台山市| 东阳市| 祁连县| 睢宁县| 寻乌县| 古蔺县| 邯郸县| 宁武县| 福鼎市| 章丘市| 金溪县| 夏津县| 阳东县| 滨州市| 云安县| 延津县| 淮安市| 出国| 柞水县| 绥江县| 中山市| 常山县| 莫力| 钦州市| 新河县| 全州县| 阿荣旗| 当阳市| 化隆| 民丰县| 八宿县| 康平县| 新安县| 新竹市|