Crossfire JXClient, Trunk
Public Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.commands.Commands Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.commands.Commands:
Collaboration graph

Public Member Functions

void addCommand (@NotNull final Command command)
 
Command findCommand (@NotNull final String commandName)
 
Collection< String > getCommands ()
 

Private Attributes

final Map< String, Commandcommands = new TreeMap<>()
 

Detailed Description

Parses and executes client-side commands.

Author
Andreas Kirschbaum

Definition at line 37 of file Commands.java.

Member Function Documentation

◆ addCommand()

void com.realtime.crossfire.jxclient.commands.Commands.addCommand ( @NotNull final Command  command)

◆ findCommand()

Command com.realtime.crossfire.jxclient.commands.Commands.findCommand ( @NotNull final String  commandName)

Returns a Command by name.

Parameters
commandNamethe command name to search
Returns
the command or
null
if
commandName
is undefined

Definition at line 70 of file Commands.java.

References com.realtime.crossfire.jxclient.commands.Commands.commands.

Referenced by com.realtime.crossfire.jxclient.commands.HelpCommand.execute().

Here is the caller graph for this function:

◆ getCommands()

Collection<String> com.realtime.crossfire.jxclient.commands.Commands.getCommands ( )

Returns all defined commands.

Returns
the commands in alphabetical order

Definition at line 60 of file Commands.java.

References com.realtime.crossfire.jxclient.commands.Commands.commands.

Referenced by com.realtime.crossfire.jxclient.commands.HelpCommand.execute().

Here is the caller graph for this function:

Member Data Documentation

◆ commands

final Map<String, Command> com.realtime.crossfire.jxclient.commands.Commands.commands = new TreeMap<>()
private

The documentation for this class was generated from the following file: