KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jresearch > gossip > beans > user > Entry


1 /*
2  * $$Id: Entry.java,v 1.3 2005/06/07 12:32:15 bel70 Exp $$
3  *
4  * ***** BEGIN LICENSE BLOCK *****
5  * The contents of this file are subject to the Mozilla Public License
6  * Version 1.1 (the "License"); you may not use this file except in
7  * compliance with the License. You may obtain a copy of the License
8  * at 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
12  * the License for the specific language governing rights and
13  * limitations under the License.
14  *
15  * The Original Code is JGossip forum code.
16  *
17  * The Initial Developer of the Original Code is the JResearch, Org.
18  * Portions created by the Initial Developer are Copyright (C) 2004
19  * the Initial Developer. All Rights Reserved.
20  *
21  * Contributor(s):
22  * Dmitry Belov <bel@jresearch.org>
23  *
24  * ***** END LICENSE BLOCK ***** */

25 /*
26  * Created on Oct 16, 2003
27  *
28  */

29 package org.jresearch.gossip.beans.user;
30
31 /**
32  * DOCUMENT ME!
33  *
34  * @author dbelov
35  */

36 public class Entry {
37     private String JavaDoc sessionId;
38
39     private String JavaDoc login;
40
41     private String JavaDoc ip;
42
43     /**
44      * Creates a new Entry object.
45      *
46      * @param sessionId
47      * DOCUMENT ME!
48      * @param login
49      * DOCUMENT ME!
50      * @param ip
51      * DOCUMENT ME!
52      */

53     public Entry(String JavaDoc login, String JavaDoc sessionId, String JavaDoc ip) {
54         this.sessionId = sessionId;
55         this.login = login;
56         this.ip = ip;
57     }
58
59     /**
60      * DOCUMENT ME!
61      *
62      * @return
63      */

64     public String JavaDoc getLogin() {
65         return login;
66     }
67
68     /**
69      * DOCUMENT ME!
70      *
71      * @param en
72      * DOCUMENT ME!
73      *
74      * @return DOCUMENT ME!
75      */

76     public boolean equals(Entry en) {
77         return this.sessionId.equals(en.getSessionId());
78     }
79
80     /**
81      * DOCUMENT ME!
82      *
83      * @return
84      */

85     public String JavaDoc getSessionId() {
86         return sessionId;
87     }
88
89     /**
90      * DOCUMENT ME!
91      *
92      * @return DOCUMENT ME!
93      */

94     public int hashCode() {
95         return this.sessionId.hashCode();
96     }
97
98     /**
99      * DOCUMENT ME!
100      *
101      * @param string
102      */

103     public void setLogin(String JavaDoc string) {
104         login = string;
105     }
106
107     /**
108      * DOCUMENT ME!
109      *
110      * @param string
111      */

112     public void setSessionId(String JavaDoc string) {
113         sessionId = string;
114     }
115
116     /**
117      * DOCUMENT ME!
118      *
119      * @return
120      */

121     public String JavaDoc getIp() {
122         return ip;
123     }
124
125     /**
126      * DOCUMENT ME!
127      *
128      * @param string
129      */

130     public void setIp(String JavaDoc string) {
131         ip = string;
132     }
133 }
134
Popular Tags