Package org.schwering.irc.lib
Class IRCUser
- java.lang.Object
-
- org.schwering.irc.lib.IRCUser
-
public class IRCUser extends java.lang.ObjectHolds variables for the nick, username and host of a user.It's used to pack these information in one object.
- See Also:
IRCEventListener,IRCParser
-
-
Constructor Summary
Constructors Constructor Description IRCUser(java.lang.String nick, java.lang.String username, java.lang.String host)Creates a newIRCUserobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetHost()Returns the host of the person who sent the line.java.lang.StringgetNick()Returns the nickname of the person who sent the line or the servername of the server which sent the line.java.lang.StringgetServername()Returns the servername of the server which sent the line or the nickname of the person who sent the line.java.lang.StringgetUsername()Returns the username of the person who sent the line.java.lang.StringtoString()Returns the nickname.
-
-
-
Method Detail
-
getNick
public java.lang.String getNick()
Returns the nickname of the person who sent the line or the servername of the server which sent the line.
If no nickname is given,nullis returned.
Note: This method is totally equal togetServername!- Returns:
- The nickname or the servername of the line. If no nick is given,
nullis returned. - See Also:
getServername(),getUsername(),getHost()
-
getServername
public java.lang.String getServername()
Returns the servername of the server which sent the line or the nickname of the person who sent the line.
If no nickname is given,nullis returned.
Note: This method is totally equal togetNick!- Returns:
- The servername or the nickname of the line. If no server is given,
nullis returned. - See Also:
getNick()
-
getUsername
public java.lang.String getUsername()
Returns the username of the person who sent the line.
If the username is not specified, this method returnsnull.
-
getHost
public java.lang.String getHost()
Returns the host of the person who sent the line.
If the host is not specified, this method returnsnull.- Returns:
- The host of the line;
nullif it's not given. - See Also:
getNick(),getUsername()
-
toString
public java.lang.String toString()
Returns the nickname.- Overrides:
toStringin classjava.lang.Object- Returns:
- The nickname.
-
-