Class CompositeResult

  • All Implemented Interfaces:
    IResult

    public final class CompositeResult
    extends Object
    implements IResult
    Return multiple result types. If it is returned from an IQuery without setAsHtml(boolean) being set to true then the Memory Analyzer graphical user interface displays each result as a separate tab. If setAsHtml(boolean) has been set true or if the CompositeResult is incorporated into an HTML report then each result appears as a separate HTML section.
    • Constructor Detail

      • CompositeResult

        public CompositeResult​(IResult... results)
        Build a result out of several others
        Parameters:
        results - a list of results
    • Method Detail

      • getResultEntries

        public List<CompositeResult.Entry> getResultEntries()
        Get a list of the sub-results
        Returns:
        an unmodifiable list
      • isEmpty

        public boolean isEmpty()
        See if there are sub-results
        Returns:
        if no sub-results
      • addResult

        public void addResult​(IResult result)
        Add one more result
        Parameters:
        result - the sub-result
      • addResult

        public void addResult​(String name,
                              IResult result)
        Add one more result with the given name
        Parameters:
        name - the name
        result - the sub-result
      • setStatus

        public void setStatus​(ITestResult.Status status)
        Set the combined status
        Parameters:
        status - the new status
      • asHtml

        public boolean asHtml()
        Whether to display the results as HTML.
        Returns:
        true if to be HTML.
      • setAsHtml

        public void setAsHtml​(boolean asHtml)
        Change the HTML setting.
        Parameters:
        asHtml - true if HTML required
      • getName

        public String getName()
        Get the name of this whole report.
        Returns:
        the name of the report
      • setName

        public void setName​(String name)
        Set the name of this whole report.
        Parameters:
        name - the name of the report