/**
* Bestpay.com.cn Inc.
* Copyright (c) 2011-2015 All Rights Reserved.
*/
package com.bestpay.bpbp.common.enums;
/**
*
*
* @author Weiliang
* @version $Id: BizTypeEnum.java, v 0.1 2015 12 14 2:20:53 Weiliang Exp $
*/
public enum BizTypeEnum {
TRAIN_TICKET("TRAIN_TICKET", " "),
TRANSPORT_DEPOSIT("TRANSPORT_DEPOSIT", " ");
/** */
private String code;
/** */
private String description;
/**
*
*
* @param code
* @param description
* @param isFinish
*/
private BizTypeEnum(String code, String description) {
this.code = code;
this.description = description;
}
/**
* <code>code</code>
*
* @param code
* @return
*/
public static BizTypeEnum getByCode(String code) {
for (BizTypeEnum bizTypeEnum : values()) {
if (bizTypeEnum.getCode().equals(code)) {
return bizTypeEnum;
}
}
return null;
}
/**
* Getter method for property <tt>code</tt>.
*
* @return property value of code
*/
public String getCode() {
return code;
}
/**
* Getter method for property <tt>description</tt>.
*
* @return property value of description
*/
public String getDescription() {
return description;
}
public static void main(String[] args) {
BizTypeEnum [] customErrorCodeEnums=BizTypeEnum.values();
for(int i=0;i<customErrorCodeEnums.length;i++){
System.out.println(customErrorCodeEnums[i].getCode());
System.out.println(customErrorCodeEnums[i].getDescription());
}
}
}