?? roleobject.java
字號:
package custom_management;
import java.io.*;
public class RoleObject
implements Serializable {
//角色的屬性
private String name;
private String description;
private long objUid;
//構(gòu)造函數(shù)
public RoleObject(long objUid,String name,String description) {
this.objUid = objUid;
this.name = name;
this.description = description;
}
//屬性的getter和setter方法
public void setName(String name) {
this.name = name;
}
public void setDescription(String description) {
this.description = description;
}
public void setObjUid(long objUid) {
this.objUid = objUid;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public long getObjUid() {
return objUid;
}
/**
* toString
*
* @return String
* @todo Implement this java.lang.Object method
*/
public String toString() {
return name;
}
/**
* equals
*
* @param object Object
* @return boolean
* @todo Implement this java.lang.Object method
*/
public boolean equals(Object object) {
if (! (object instanceof RoleObject))
return false;
return (object == null) ? false : (((RoleObject)object).getObjUid() == this.objUid );
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -