少年阿賓

          那些青春的歲月

            BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
            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 閱讀(2384) 評(píng)論(0)  編輯  收藏 所屬分類: Java內(nèi)部類 、JavaEnum

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 桐乡市| 平原县| 沙洋县| 洪雅县| 阜阳市| 桃园县| 博兴县| 易门县| 五原县| 横峰县| 朝阳区| 乡宁县| 固镇县| 安吉县| 大田县| 大足县| 柳江县| 江西省| 怀柔区| 吐鲁番市| 孟村| 甘德县| 罗江县| 嘉荫县| 馆陶县| 清远市| 木兰县| 从江县| 南京市| 廉江市| 淮南市| 绥阳县| 林西县| 滨州市| 民勤县| 广平县| 嵊州市| 灵璧县| 上饶市| 青神县| 徐闻县|