user.java

来自「是一款国外的网络游戏平台的源码*不是类似浩方那种虚拟局域网技术」· Java 代码 · 共 48 行

JAVA
48
字号
/*
 * Created on May 29, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package org.GTADS.usermanager;

import java.util.*;

/**
 * @author Administrator
 *
 * 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 UserProfile profile;
	private Vector currentChatrooms = new Vector();
	
	public User(String username) {
		this.username = username;
		
		// TODO: read in the profile from a hash
	}
	
	public String getUsername() {
		return username;
	}
	
	public void setUsername(String username){
		this.username = username;
	}
	
	public void setChatroom(String chatroom){
		currentChatrooms.add(chatroom);
	}
	
	public Vector getChatroom(){
		return currentChatrooms;
	}
	
	public void removeChatroom(String chatroom){
		currentChatrooms.remove(chatroom);
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?