23 package com.realtime.crossfire.jxclient.gui.commandlist;
25 import java.util.ArrayList;
26 import java.util.List;
27 import org.jetbrains.annotations.NotNull;
28 import org.jetbrains.annotations.Nullable;
46 private final List<GUICommand>
commandList =
new ArrayList<>();
72 if (!command.canExecute()) {
81 if (command.canExecute()) {
113 final StringBuilder sb =
new StringBuilder();
114 boolean firstCommand =
true;
117 throw new AssertionError(
"Cannot encode command of type "+guiCommand.getClass().getName());
119 final String commandString = ((
GUICommand2)guiCommand).getCommandString();
121 firstCommand =
false;
125 sb.append(commandString);
127 return sb.toString();
137 if (command.isAssignableFrom(tmp.getClass())) {