Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/relayirc/chatengine/User.java


1   
2   /* 
3    * FILE: User.java 
4    * 
5    * The contents of this file are subject to the Mozilla Public License
6    * Version 1.0 (the "License"); you may not use this file except in
7    * compliance with the License. You may obtain a copy of the License at
8    * http://www.mozilla.org/MPL/
9    * 
10   * Software distributed under the License is distributed on an "AS IS"
11   * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
12   * License for the specific language governing rights and limitations
13   * under the License.
14   * 
15   * The Original Code is Relay IRC chat client.
16   * 
17   * The Initial Developer of the Original Code is David M. Johnson.
18   * Portions created by David M. Johnson are Copyright (C) 1998. 
19   * All Rights Reserved.
20   *
21   * Contributor(s): No contributors to this file.
22   */
23  
24  package org.relayirc.chatengine;
25  import org.relayirc.util.*;
26  
27  import java.io.Serializable;
28  
29  /** 
30   * Represent a user that has been added to the favorites collection.
31   * TODO: Perhaps a user object should query/listen-to the chat engine
32   * to determine if user is online and which channels the user is on.
33   * TODO: Perhaps a user object should support message, kick, ban and
34   * other methods. 
35   * TODO: Should provide property change support. 
36   */
37  public class User implements Serializable {
38     static final long serialVersionUID = -3629822682453945180L;
39  
40    private String _name;
41  
42     /** Construct user object for user specified by nick. */
43     public User(String name) {
44        _name = name;
45     }
46    /** Get user nick. */
47    public String getName() {return _name;}
48  
49    /** Set user nick. */
50     public void setName(String name) {_name=name;}
51  
52     /** String representation for display purposes. */
53     public String toString() {return _name;}
54  
55     /*
56     // Ideas
57     public boolean isOnline() {}
58     public boolean message(String message){}
59     public void version() {}
60     public void whois() {}
61     public void ban() {}
62     public void kick() {}
63     */
64  }