|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--User
The user class holds some information about a user in a channel.
Constructor Summary | |
User(int code,
java.lang.String ip)
Creates a new user. |
|
User(java.lang.String name,
java.lang.String realname,
java.lang.String ip,
java.lang.String host)
Creates a new user. |
Method Summary | |
static java.lang.String |
createIdent(java.lang.String ip)
Creates an ident String from the given ip. |
boolean |
equals(java.lang.Object object)
Used to compare this User with another object. |
int |
getCode()
Used to get the unique id of the user. |
java.util.Date |
getDate()
Used to get the date the user logged on. |
java.lang.String |
getHost()
Used to get the host from which the user is connecting. |
java.lang.String |
getIdent()
Used to get the ident String for this user. |
java.lang.String |
getIP()
Used to get the ip from which the user is connecting. |
int |
getLag()
Used to get the lag of the user (in seconds). |
java.lang.String |
getName()
Used to get the nickname of the user. |
java.lang.String |
getRealName()
Used to get the real name of the user. |
int |
hashCode()
Used internally when searching for User objects. |
void |
setLag(int lag)
Used to set the lag of user (in seconds). |
void |
setName(java.lang.String nick)
Used to set the nickname of the user. |
java.lang.String |
toString()
Used to get a String representation of this User object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public User(java.lang.String name, java.lang.String realname, java.lang.String ip, java.lang.String host)
name
- The nickname of the user.realname
- The real name of the user.ip
- The ip the user is connecting from.host
- The host the user is connecting from.public User(int code, java.lang.String ip)
code
- The unique user identification code.ip
- The ip the user is connecting from.Method Detail |
public static java.lang.String createIdent(java.lang.String ip)
ip
- The ip address of the user (eg, 123.123.42.17).public int hashCode()
hashCode
in class java.lang.Object
public int getCode()
public java.lang.String getName()
public void setName(java.lang.String nick)
nick
- The nickname of the user.public java.lang.String getHost()
public java.lang.String getIP()
public java.lang.String getRealName()
public java.util.Date getDate()
public java.lang.String getIdent()
public int getLag()
public void setLag(int lag)
lag
- The number of seconds the user is lagged.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- If the passed object is another User
they are considered to be the same
user if they have the same code and
connect from the same host.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |