package com.qiyou.mb.android.utils.enums;

public enum TrackType { 
	
BIKE(0),HIKE(1),MOTOR(2),FLY(3),DIVE(4),GPX(5),OTHER(6),COPY(7);
	
TrackType(int type){
	this.type=type;
}
private int type=0;
@Override
public String toString() {

    return String.valueOf(this.type);

}
public int toInt() {

    return type;

}

public String toCHString() {

	switch(type){
	case 0:{return "骑行";}
	case 1:{return "徒步";}
	case 2:return "机动";
	case 3:return "轮滑";
	case 4:return "踏板";
	case 5:return "路书";
	case 7:return "拷贝";
	case 6:return "其他";
	default:return "骑行";
	}
 
}
//public TrackType getType(final int type){
//	switch(type){
//		case 0:{return BIKE;}
//		case 1:{return HIKE;}
//		case 2:return MOTOR;
//		case 3:return FLY;
//		case 4:return DIVE;
//		case 5:return OTHER;
//		default: return BIKE;
//	} 
// }
public static TrackType valueOf(int type) {
	// TODO Auto-generated method stub
	switch(type){
		case 0:{return BIKE;}
		case 1:{return HIKE;}
		case 2:return MOTOR;
		case 3:return FLY;
		case 4:return DIVE;
		case 5:return GPX;
		case 7:return COPY;
		case 6:return OTHER;
		default: return BIKE;
		} 
	 
	}
}
