|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jackofalltrades.irc.CtcpCommand
Represents a command received in the "trailing" portion of a command received via IRC. CTCP commands are delimited by \001 characters.
Field Summary | |
static java.lang.String |
ACTION_COMMAND
the name for an "action" ctcp command. |
static java.lang.String |
CLIENT_INFO_COMMAND
the name for a "clientinfo" ctcp command. |
static java.lang.String |
DCC_COMMAND
the name for a "dcc" ctcp command. |
static java.lang.String |
ERROR_MESSAGE_COMMAND
the name for an error message ctcp command. |
static java.lang.String |
FINGER_COMMAND
the name for a "finger" ctcp command. |
static java.lang.String |
SED_COMMAND
the name for a "sed" (send encrypted data) ctcp command. |
static java.lang.String |
SOURCE_COMMAND
the name for a "source" ctcp command. |
static java.lang.String |
TIME_COMMAND
the name for a "time" ctcp command. |
static java.lang.String |
USER_INFO_COMMAND
the name for a "userinfo" ctcp command. |
static java.lang.String |
VERSION_COMMAND
the name for a "version" ctcp command. |
Constructor Summary | |
CtcpCommand()
Creates a new instance of CtcpCommand . |
|
CtcpCommand(java.lang.String name)
Creates a new named instance of CtcpCommand . |
|
CtcpCommand(java.lang.String name,
java.util.List params)
Creates a new named instance of CtcpCommand with the
specified parameters. |
|
CtcpCommand(java.lang.String name,
java.lang.String[] params)
Creates a new named instance of CtcpCommand with the
specified parameters. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Determines if o is equal to the current
CtcpCommand . |
java.lang.String |
getName()
Returns the name of the command. |
java.lang.String |
getParam(int index)
Returns the String parameter at the specified index . |
java.util.List |
getParams()
Returns a copy of the java.util.List of String
parameters. |
int |
hashCode()
Returns a hashcode for the current CtcpCommand . |
boolean |
hasParams()
Indicates whether the current CtcpCommand has parameters. |
void |
setName(java.lang.String name)
Sets the name of the command. |
void |
setParams(java.util.List params)
Sets the java.util.List of String parameters. |
java.lang.String |
toString()
Returns a String representation of the command's name
and parameters. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String FINGER_COMMAND
public static final java.lang.String VERSION_COMMAND
public static final java.lang.String SOURCE_COMMAND
public static final java.lang.String USER_INFO_COMMAND
public static final java.lang.String CLIENT_INFO_COMMAND
public static final java.lang.String ERROR_MESSAGE_COMMAND
public static final java.lang.String TIME_COMMAND
public static final java.lang.String ACTION_COMMAND
public static final java.lang.String DCC_COMMAND
public static final java.lang.String SED_COMMAND
Constructor Detail |
public CtcpCommand()
CtcpCommand
.
public CtcpCommand(java.lang.String name)
CtcpCommand
.
name
- the name of the CtcpCommand
.public CtcpCommand(java.lang.String name, java.lang.String[] params)
CtcpCommand
with the
specified parameters.
name
- the name of the CtcpCommand
.params
- the parameters for the command.
java.lang.IllegalArgumentException
- if name
is blank
or null.public CtcpCommand(java.lang.String name, java.util.List params)
CtcpCommand
with the
specified parameters.
name
- the name of the CtcpCommand
.params
- the parameters for the command.
java.lang.IllegalArgumentException
- if name
is blank
or null.Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the new command name.
java.lang.IllegalArgumentException
- if name
is blank
or null.public java.util.List getParams()
java.util.List
of String
parameters.
public void setParams(java.util.List params)
java.util.List
of String
parameters.
params
- the new parameter java.util.List
.public boolean hasParams()
CtcpCommand
has parameters.
public java.lang.String getParam(int index)
String
parameter at the specified index
.
index
- the zero-based index of the parameter to be returned.
index
or null.public boolean equals(java.lang.Object o)
o
is equal to the current
CtcpCommand
.
o
- the object to compare.
o
is equivalent to the current object,
otherwise false.public int hashCode()
CtcpCommand
.
public java.lang.String toString()
String
representation of the command's name
and parameters.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |