Interface OptionConsumer<C,​V>

    • Method Detail

      • globalInfo

        String globalInfo()
        Returns a string describing the object.
        Returns:
        a description suitable for displaying in the gui
      • setLoggingLevel

        void setLoggingLevel​(LoggingLevel value)
        Sets the logging level.
        Parameters:
        value - the logging level
      • getLoggingLevel

        LoggingLevel getLoggingLevel()
        Returns the logging level.
        Returns:
        the logging level
      • hasErrors

        boolean hasErrors()
        Checks whether errors were encountered while consuming the options.
        Returns:
        true if errors were encountered
        See Also:
        getErrors()
      • getErrors

        List<String> getErrors()
        Returns the error log.
        Returns:
        the error log, can be empty
        See Also:
        hasErrors()
      • hasWarnings

        boolean hasWarnings()
        Checks whether warnings were encountered while consuming the options.
        Returns:
        true if warnings were encountered
        See Also:
        getWarnings()
      • getWarnings

        List<String> getWarnings()
        Returns the warning log.
        Returns:
        the warning log, can be empty
        See Also:
        hasWarnings()
      • setQuiet

        void setQuiet​(boolean value)
        Sets whether console output is suppressed or not.
        Parameters:
        value - if true then console output is suppressed (out/err)
      • isQuiet

        boolean isQuiet()
        Returns whether console output is suppressed or not.
        Returns:
        true if console output is suppressed
      • setSkippedProperties

        void setSkippedProperties​(HashSet<String> value)
        Sets the top-level properties to skip.
        Parameters:
        value - the properties
      • getSkippedProperties

        HashSet<String> getSkippedProperties()
        Returns the skipped top-level properties.
        Returns:
        the properties
      • getOutput

        OptionHandler getOutput()
        Returns the visited top-level object.
        Returns:
        the visited object
      • setInput

        void setInput​(C input)
        Sets the input data to use.
        Parameters:
        input - the data to use
      • getInput

        C getInput()
        Returns the currently set input data.
        Returns:
        the data in use
      • consume

        OptionHandler consume()
        Consumes the current input. The generated option handler can be retrieved via getOutput() as well.
        Returns:
        the created object
        See Also:
        getOutput()
      • consume

        OptionHandler consume​(OptionHandler output,
                              C input)
        Consumes the provided input and updates the provided option handler. The option handler can be retrieved via getOutput() as well.
        Parameters:
        output - the option handler to update
        input - the data to use for updating
        Returns:
        the updated object
        See Also:
        getOutput()
      • fromString

        OptionHandler fromString​(String s)
        Processes the specified string.
        Parameters:
        s - the string to process
        Returns:
        the created object
        See Also:
        getOutput()
      • fromFile

        OptionHandler fromFile​(File file)
        Processes the specified file.
        Parameters:
        file - the file to process
        Returns:
        the created object, null in case content of file couldn't be loaded
      • read

        OptionHandler read​(String filename)
        Reads the option handler from the specified file.
        Parameters:
        filename - the file to read from
        Returns:
        the option handler if successful, null otherwise
      • cleanUp

        void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface CleanUpHandler