Class CommandList
- java.lang.Object
-
- com.realtime.crossfire.jxclient.gui.commandlist.CommandList
-
public class CommandList extends java.lang.ObjectA list ofGUICommandinstances.
-
-
Constructor Summary
Constructors Constructor Description CommandList(@NotNull CommandListType commandListType)Creates a new instance as an empty command list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(@NotNull GUICommand guiCommand)Adds a command to the end of this command list.booleancontainsCommand(@NotNull java.lang.Class<? extends GUICommand> command)Returns whether this command list contains a command of the given type.voidexecute()Execute the command list by callingGUICommand.execute()for each command in order.@NotNull java.lang.StringgetCommandString()Returns the commands as a string.
-
-
-
Constructor Detail
-
CommandList
public CommandList(@NotNull @NotNull CommandListType commandListType)Creates a new instance as an empty command list.- Parameters:
commandListType- the command list type
-
-
Method Detail
-
add
public void add(@NotNull @NotNull GUICommand guiCommand)Adds a command to the end of this command list.- Parameters:
guiCommand- the command to add
-
execute
public void execute()
Execute the command list by callingGUICommand.execute()for each command in order.
-
getCommandString
@NotNull public @NotNull java.lang.String getCommandString()
Returns the commands as a string.- Returns:
- the commands as a string
-
containsCommand
public boolean containsCommand(@NotNull @NotNull java.lang.Class<? extends GUICommand> command)Returns whether this command list contains a command of the given type.- Parameters:
command- the command type- Returns:
- whether the command type was found
-
-