|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjerklib.EventToken
public class EventToken
A Class to parse a line of IRC text
<message> ::= [':' <prefix> <SPACE> ] <command> <params> <crlf> <prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ] <command> ::= <letter> { <letter> } | <number> <number> <number> <SPACE> ::= ' ' { ' ' } <params> ::= <SPACE> [ ':' <trailing> | <middle> <params> ] <middle> ::= <Any *non-empty* sequence of octets not including SPACE or NUL or CR or LF, the first of which may not be ':'> <trailing> ::= <Any, possibly *empty*, sequence of octets not including NUL or CR or LF>
Constructor Summary | |
---|---|
EventToken(String data)
Create a new EventToken |
Method Summary | |
---|---|
String |
arg(int index)
Gets an argument |
List<String> |
args()
Gets list of arguments |
String |
command()
Gets the command |
String |
data()
Returns raw event data |
String |
hostName()
Gets hostname from message |
String |
nick()
Get nick from message |
int |
numeric()
Get the numeric code of an event. |
String |
prefix()
Gets message prefix if any |
String |
toString()
|
String |
userName()
Get username from message |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventToken(String data)
data
- to parseMethod Detail |
---|
public String hostName()
public String userName()
public String nick()
public String prefix()
public String command()
public List<String> args()
public String arg(int index)
index
-
public String data()
public int numeric()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |