package de.ugoe.cs.quest; import java.util.logging.Level; import de.ugoe.cs.util.console.Console; /** *

* Helper class that collects methods that are often used by the commands. *

* * @author Steffen Herbold * @version 1.0 */ public class CommandHelpers { /** *

* Prints a message to error stream of the {@link Console} that an object * has not been found in the storage. *

* * @param objectName * name of the object */ public static void objectNotFoundMessage(String objectName) { Console.printerrln("Object " + objectName + " not found in storage."); } /** *

* Prints a message to the error stream of the {@link Console} that an * object is not of an expected type. *

* * @param objectName * name of the object * @param type * expected type */ public static void objectNotType(String objectName, String type) { Console.printerrln("Object " + objectName + "not of type " + type + "."); } /** *

* Prints a message to the trace stream of the {@link Console} that an * object in the storage has been overwritten. *

* * @param objectName */ public static void dataOverwritten(String objectName) { Console.traceln(Level.INFO, "Existing object " + objectName + " overwritten."); } }