code066.java
1package pack02; 2 3import java.util.Vector; 4 5//UserInfoList�� 6public class code066 7{ 8 private static code066 user = new code066(); //����private���ù��캯������ֹ���������µ�ʵ������ 9 private Vector<String> vector = null; 10 11 public code066() 12 { 13 this.vector = new Vector<String>(); 14 } 15 16 public static code066 getInstance() 17 { 18 return code066.user; 19 } 20 21 //����û� 22 public boolean addUserInfo(String userName) 23 { 24 if (userName != null) 25 { 26 this.vector.add(userName); 27 return true; 28 } 29 else 30 { 31 return false; 32 } 33 } 34 35 //�����û��б� 36 public Vector<String> getList() 37 { 38 return this.vector; 39 } 40 41 //�Ƴ��û� 42 public void removeUserInfo(String userName) 43 { 44 if (userName != null) 45 { 46 this.vector.removeElement(userName); 47 } 48 } 49} 50