User (PircBot 1.0.3 - Paul's Java IRC Bot Framework)
|
PircBot Java IRC Bot | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jibble.pircbot.User
This class is used to represent a user on an IRC server. Instances of this class are returned by the getUsers method in the PircBot class.
This class implements Comparable, so it is possible to sort lists of User objects into case-insensitive alphabetical order.
Constructor Summary | |
User(String prefix,
String nick)
Constructs a User object with a known prefix and nick. |
Method Summary | |
int |
compareTo(Object o)
Returns the result of calling the compareTo method on lowercased nicks. |
boolean |
equals(Object o)
Returns true if the nick represented by this User object is the same as the nick of the User object given as an argument. |
boolean |
equals(String nick)
Returns true if the nick represented by this User object is the same as the argument. |
String |
getNick()
Returns the nick of the user. |
String |
getPrefix()
Returns the prefix of the user. |
int |
hashCode()
Returns the hash code of this User object. |
boolean |
hasVoice()
Returns whether or not the user represented by this object has voice. |
boolean |
isOp()
Returns whether or not the user represented by this object is an operator. |
String |
toString()
Returns the nick of the user complete with their prefix if they have one, e.g. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public User(String prefix, String nick)
prefix
- The status of the user, for example, "@".nick
- The nick of the user.Method Detail |
public String getPrefix()
public boolean isOp()
public boolean hasVoice()
public String getNick()
public String toString()
toString
in class Object
public boolean equals(String nick)
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
|
PircBot Java IRC Bot | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |