user.java
来自「一个rmi程序例子」· Java 代码 · 共 79 行
JAVA
79 行
import java.util.*;
/*
* Created on 2006-6-5
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
/**
* @author lizhao
*
* TODO To change the template for this generated type comment go to Window -
* Preferences - Java - Code Style - Code Templates
*/
public class User {
private String userName;
private String password;
private Vector meetings;
public User(String userName, String password) {
this.userName = userName;
this.password = password;
meetings = new Vector();
}
/*
* *Return the userName of the user.
*/
public String getUserName() {
return userName;
}
/*
* *Return the password of the user.
*/
public String getPassword() {
return password;
}
/*
* *Return the number of the user's meetings.
*/
public int getNumberOfMeetings() {
return meetings.size();
}
/*
* *Add message to the vector of the messages.
*/
public void addMeeting(Meeting meeting) {
meetings.add(meeting);
}
/*
* *Remove message from the vector of the messages.
*/
public void removeMeeting(Meeting meeting) {
meetings.remove(meeting);
}
/*
* *Get message to the vector of the messages.
*/
public Meeting getMeeting(int i) {
return (Meeting) meetings.get(i);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?