key = "#initial";\r
}\r
\r
+ /**\r
+ * Creates new state by cloning all commands of the provided state and \r
+ * then overriding one of them with the provided state changing command.\r
+ * \r
+ * @param previousState\r
+ * @param newCommand\r
+ */\r
public Pazpar2State (Pazpar2State previousState, Pazpar2Command newCommand) {\r
for (String commandName : previousState.commands.keySet()) {\r
this.commands.put(commandName, previousState.commands.get(commandName).copy());\r
}\r
\r
/**\r
- * Checks if the provided command represents a state change\r
+ * Checks if a command represents a change of this state\r
* \r
* @param command\r
* @return true if the command causes a change of state\r
}\r
} \r
\r
+ /**\r
+ * Returns a command from this state\r
+ * \r
+ * @param name\r
+ * @return\r
+ */ \r
public Pazpar2Command getCommand(String name) {\r
return commands.get(name);\r
}\r