您的位置:首页 > 运维架构 > Linux

Linux协议栈报文收发流程记录

2013-06-08 14:35 405 查看
 
public enum FtpActionType {
LOGIN(1) {
public String getTitle() {
return "登陆";
}
},
LOGOUT(2) {
public String getTitle() {
return "登出";
}
},
UNKNOWN(99) {
public String getTitle() {
return "未知";
}
};

private int code;

FtpActionType(int code) {
this.code = code;
}

@Override
public String toString() {
return String.valueOf(code);
}

public abstract String getTitle();
}
public enum Difficulty {
// 注意:枚举成员命名,请使用英文大写形式
NORMAL(1), MEDIUM(2), HARD(3);
/**
* final修饰字段是一个良好的实践。
*/
final private int id;

Difficulty(final int id){
this.id=id;
}
/**
* 获得ID
* @return
*/
public int getId() {
return id;
}
}
/*** 游戏中的难度枚举:NORMAL , MEDIUM, HARD** @author mercyblitz*/public enum Difficulty {NORMAL, MEDIUM, HARD //注意:枚举成员命名,请使用英文大写形式}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: