Search in sources :

Example 1 with GUIConsoleIterator

use of com.sri.ai.util.console.gui.GUIConsoleIterator in project aic-expresso by aic-sri-international.

the class SymbolicShell method getConsole.

private static ConsoleIterator getConsole(String[] args) {
    ConsoleIterator result = null;
    OptionParser parser = new OptionParser();
    OptionSpec<String> consoleType = parser.accepts("console", "Console type <gui or default>").withRequiredArg().ofType(String.class);
    OptionSet options = parser.parse(args);
    if (options.has(consoleType)) {
        if ("gui".equalsIgnoreCase(options.valueOf(consoleType))) {
            result = new GUIConsoleIterator();
        }
    }
    if (result == null) {
        result = new DefaultConsoleIterator();
    }
    return result;
}
Also used : DefaultConsoleIterator(com.sri.ai.util.console.DefaultConsoleIterator) GUIConsoleIterator(com.sri.ai.util.console.gui.GUIConsoleIterator) ConsoleIterator(com.sri.ai.util.console.ConsoleIterator) DefaultConsoleIterator(com.sri.ai.util.console.DefaultConsoleIterator) GUIConsoleIterator(com.sri.ai.util.console.gui.GUIConsoleIterator) OptionSet(joptsimple.OptionSet) OptionParser(joptsimple.OptionParser)

Aggregations

ConsoleIterator (com.sri.ai.util.console.ConsoleIterator)1 DefaultConsoleIterator (com.sri.ai.util.console.DefaultConsoleIterator)1 GUIConsoleIterator (com.sri.ai.util.console.gui.GUIConsoleIterator)1 OptionParser (joptsimple.OptionParser)1 OptionSet (joptsimple.OptionSet)1