📄 corbaitem.java
字号:
www.pudn.com > Exercise5.rar > CorbaItem.java
import java.util.*;
/**
* The item that record the user name, date, id and label.
*
* @author Jinjiang
*
*/
public class CorbaItem {
private String username;
private int id;
private Date start;
private Date end;
private String label;
/**
* The default constructor.
*
*/
public CorbaItem() {
}
/**
* The constructor that has all attributes initial.
*
* @param u
* username
* @param i
* id
* @param s
* start
* @param e
* end
* @param l
* label
*/
public CorbaItem(String u, int i, Date s, Date e, String l) {
username = u;
id = i;
start = s;
end = e;
label = l;
}
/**
* Return the username.
*
* @return username
*/
public String getUsername() {
return username;
}
/**
* Return the id.
*
* @return id
*/
public int getId() {
return id;
}
/**
* Return the start time.
*
* @return start time
*/
public Date getStart() {
return start;
}
/**
* Return the end time.
*
* @return end time
*/
public Date getEnd() {
return end;
}
/**
* Return the lable.
*
* @return label
*/
public String getLabel() {
return label;
}
/**
* Return the description of the item.
*
* @return a string to description of the item.
*/
public String toString() {
return "\nNo." + id + ": " + label + "\n\tStart: " + start.toString()
+ "\n\tEnd: " + end.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -