锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产精品嫩草影院,亚洲高清无码专区视频,亚洲国产无线乱码在线观看 http://m.tkk7.com/stevenjohn/category/52529.html閭d簺闈掓槬鐨勫瞾鏈?/description>zh-cnSun, 02 Sep 2012 19:50:17 GMTSun, 02 Sep 2012 19:50:17 GMT60Java enum鍜屾柟娉曞唴閮ㄧ被http://m.tkk7.com/stevenjohn/archive/2012/09/02/386807.htmlabinabinSun, 02 Sep 2012 10:00:00 GMThttp://m.tkk7.com/stevenjohn/archive/2012/09/02/386807.htmlhttp://m.tkk7.com/stevenjohn/comments/386807.htmlhttp://m.tkk7.com/stevenjohn/archive/2012/09/02/386807.html#Feedback0http://m.tkk7.com/stevenjohn/comments/commentRss/386807.htmlhttp://m.tkk7.com/stevenjohn/services/trackbacks/386807.htmlpackage 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);
}
}


abin 2012-09-02 18:00 鍙戣〃璇勮
]]>
Java Stirng鍜宔num鐩鎬簰杞寲http://m.tkk7.com/stevenjohn/archive/2012/09/02/386796.htmlabinabinSun, 02 Sep 2012 07:46:00 GMThttp://m.tkk7.com/stevenjohn/archive/2012/09/02/386796.htmlhttp://m.tkk7.com/stevenjohn/comments/386796.htmlhttp://m.tkk7.com/stevenjohn/archive/2012/09/02/386796.html#Feedback0http://m.tkk7.com/stevenjohn/comments/commentRss/386796.htmlhttp://m.tkk7.com/stevenjohn/services/trackbacks/386796.htmlpackage com.abin.lee.collection.enumer;
public class ChangeType {
public static enum stype{
CHINA("china"),JAPAN("japan"),GERMAN("german");
private String textVal;
private stype(String textVal){
this.textVal=textVal;
}
public String toString(){
return textVal;
}
}
public static void main(String[] args) {
String abin=stype.CHINA.toString();
System.out.println(abin);
stype abing=stype.valueOf("CHINA");//娉ㄦ剰榪欓噷涓嶅簲璇ヤ紶china銆乯apan銆乬erman錛屽繀欏諱紶CHINA,JAPAN,GERMAN
System.out.println("abing="+abing);
}
}


abin 2012-09-02 15:46 鍙戣〃璇勮
]]>
Java 闈欐佸唴閮ㄧ被鍜屾灇涓?閾惰仈鏀粯)http://m.tkk7.com/stevenjohn/archive/2012/09/02/386776.htmlabinabinSat, 01 Sep 2012 16:03:00 GMThttp://m.tkk7.com/stevenjohn/archive/2012/09/02/386776.htmlhttp://m.tkk7.com/stevenjohn/comments/386776.htmlhttp://m.tkk7.com/stevenjohn/archive/2012/09/02/386776.html#Feedback0http://m.tkk7.com/stevenjohn/comments/commentRss/386776.htmlhttp://m.tkk7.com/stevenjohn/services/trackbacks/386776.html//榪欓噷闈富瑕佹槸鐢變簬閾惰仈鐨勬墜鏈烘敮浠樼敤鍒頒簡涓涓粯嬈劇殑杞崲鏂瑰紡闂錛屽綋璋冪敤鏀粯瀹濅粯嬈劇殑鏃跺欙紝姣斿涓鍒嗛挶鏍煎紡灝辨槸鎴戜滑鏅氱敤鐨勬牸寮忥細0.01錛岃岄摱鑱旂‘瑕佹妸鏍煎紡杞寲涓?00000000001錛堥摱鑱旇姹傛槸12浣嶏級榪欑鏍煎紡鐨勶紝鏈鍚庝竴浣嶆槸鍒嗭紝鐒跺悗鍚戝墠渚濇鏄錛屽厓錛屽崄鍏冿紝鐧懼厓錛岀浉淇′笉鐢ㄦ垜璇達紝浣犲凡緇忔噦浜嗗惂銆傛墍浠ヨ繖閲屽氨闇瑕佷竴涓漿鎹紝涓轟簡搴斿鍍?000錛?000.00錛?000.0榪欑浼犺繃鏉ョ殑鏍煎紡鐨勬暟鎹紝鐗瑰仛涓涓嬭漿鎹紝鐒跺悗浼犵粰閾惰仈榪涜鏀粯銆?br />

package com.abin.lee.collection.inner;
public class ConsumeFinance {
public static enum Currency{
CHINARMB("chinarmb"),DOLLAR("dollar"),HK("hk");
private Currency(String textVal){
this.textVal=textVal;
}
private String textVal;
public String toString(){
return textVal;
}
}
public static String ConsumeProcess(String money,Currency currency){
System.out.println("currentcy="+currency);
String flag=null;
if(currency.equals(Currency.CHINARMB)){
ConsumeFinance.ChinaProcess chinaProcess=new ConsumeFinance.ChinaProcess();
flag=chinaProcess.chinaChange(money, currency);
}
return flag;
public static String ConsumeProcessReturn(String money,Currency currency){
System.out.println("currentcy="+currency);
String flag=null;
if(currency.equals(Currency.CHINARMB)){
ConsumeFinance.ChinaReturn chinaReturn=new ConsumeFinance.ChinaReturn();
flag=chinaReturn.chinaReChange(money, currency);
}
return flag;
public static class ChinaProcess{
private static String status=null;
public static String chinaChange(String money,Currency currency){
int point=money.lastIndexOf(".");
if(point==-1){
StringBuffer stb=new StringBuffer();
int len=money.length();
int lon=10-len;
for(int i=0;i<lon;i++){
stb.append("0");
}
stb.append(money);
stb.append("00");
status=stb.toString().intern();
}
if(point>0){
int len=money.indexOf(".");
int chn=money.length()-len-1;
switch(chn){
//鍏堝垽鏂璵oney鏍煎紡涓?00.0榪欑鏍煎紡鐨勶紝灝忔暟鐐瑰悗闈㈡湁涓浣嶅皬鏁扮偣鐨勬儏鍐?/div>
case  1:
StringBuffer stb=new StringBuffer(money);
stb.deleteCharAt(len);
int lend=stb.length();
StringBuffer sb=new StringBuffer();
for(int i=0;i<12-lend;i++){
sb.append("0");
}
sb.append(stb.toString());
status=sb.toString().intern();
//鍏堝垽鏂璵oney鏍煎紡涓?00.01榪欑鏍煎紡鐨勶紝灝忔暟鐐瑰悗闈㈡湁涓や綅灝忔暟鐐圭殑鎯呭喌
case 2:
money=money.replace(".", "");
int lende=money.length();
String connect="";
for(int i=0;i<12-lende;i++){
connect+="0";
}
status=connect+money;
}
}
return status;
}
}
//鎶?00000001001杞寲涓?0.01榪欑鏍煎紡
public static class ChinaReturn{
private static String status=null;
public static String chinaReChange(String money,Currency currency){
int change=money.length();
int num=0;
for(int i=0;i<change;i++){
int value=Integer.valueOf(String.valueOf(money.charAt(i)));
if(value>0){
num=i;
break;
}
}
money=money.substring(num);
if(num==10){
status="0."+money;
}
if(num==11){
status="0.0"+money;
}
if(num<10){
System.out.println(money.length());
StringBuffer stb=new StringBuffer(money);
stb.insert(money.length()-2, ".");
status=stb.toString().intern();
}
return status;
}
}
public static void main(String[] args) {
Currency currency=Currency.CHINARMB;
String money="000000001001";
String result=ConsumeProcessReturn(money, currency);
// String result=ConsumeProcess(money, currency);
System.out.println("result="+result);
}
}


abin 2012-09-02 00:03 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲国产精品日韩| 天天看免费高清影视| AV在线播放日韩亚洲欧| 美女被爆羞羞网站免费| 免费一级特黄特色大片在线观看| 亚洲国产精品成人AV在线| 免费可以在线看A∨网站| 亚洲综合色一区二区三区| 免费看香港一级毛片| 天天综合亚洲色在线精品| 免费jlzzjlzz在线播放视频| 男女啪啪免费体验区| 在线亚洲97se亚洲综合在线| 成人精品视频99在线观看免费| 亚洲日产韩国一二三四区| 全免费a级毛片免费看| 亚洲无砖砖区免费| 女人被免费视频网站| 另类小说亚洲色图| 久久伊人亚洲AV无码网站| 无码人妻久久一区二区三区免费| 亚洲精品自在线拍| 在线观看91精品国产不卡免费| 搜日本一区二区三区免费高清视频 | 亚洲国产AV无码专区亚洲AV| 国产成人AV片无码免费| 亚洲国产日韩女人aaaaaa毛片在线| 天天看免费高清影视| 和老外3p爽粗大免费视频| 老汉色老汉首页a亚洲| 午夜寂寞在线一级观看免费| 免费人妻精品一区二区三区| 久久精品国产亚洲AV网站| 国产h视频在线观看免费| 粉色视频成年免费人15次| 亚洲欧洲日韩国产综合在线二区| 成人奭片免费观看| 亚洲视频在线免费| 亚洲人xxx日本人18| 不卡一卡二卡三亚洲| 中国在线观看免费国语版|