src/edu/kit/informatik/literatur_system/CommandHandler.java
/**
     * Tries to execute the command line.
     * @param input the CLI input
     * @return the command associated to the input in the CLI
     * @throws IllegalArgumentException if the given command isn't valid
     */
Tries to execute the command line.
@param input the CLI input
@return the command associated to the input in the CLI
@throws IllegalArgumentException if the given command isn't valid
Tries to execute the command line . @param input the CLI input @return the command associated to the input in the CLI @throws IllegalArgumentException if the given command isn ' t valid
public ICommand<T> accept(final String input) {
        Objects.requireNonNull(input);
        final Optional<ICommand<T>> cmd = find(input);
        if (!cmd.isPresent())
            throw new IllegalArgumentException("no such command: '" + input + "'");            
        cmd.get().execute(target, input);
        return cmd.get();
    }
public ICommand < T > accept ( final String input ) { Objects . requireNonNull ( input ) ; final Optional < ICommand < T > > cmd = find ( input ) ; if ( ! cmd . isPresent ( ) ) throw new IllegalArgumentException ( "no such command: '" + input + "'" ) ; cmd . get ( ) . execute ( target , input ) ; return cmd . get ( ) ; }
Tries to execute the command line.
Tries to execute the command line .