Interface PrettyCommand<T>

  • Type Parameters:
    T - The return parameter of the Command.execute(Object) method.
    All Superinterfaces:
    Command<T>

    public interface PrettyCommand<T>
    extends Command<T>
    This interface can be implemented by commands that are able to prettify their output object as a string.
    • Method Detail

      • prettify

        String prettify​(T object)
                 throws Exception
        This method is called with the return value of Command.execute(Object) as parameter if the execution context allows pretty output.
        Parameters:
        object - the return value of Command.execute(Object)
        Returns:
        a formatted string for pretty output.
        Throws:
        Exception - if the prettifying process throws an error.