org.eclipse.mat.query.results

## Class CompositeResult

- java.lang.Object
- - org.eclipse.mat.query.results.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.

### Nested Class Summary

Nested Classes
`static class` `CompositeResult.Entry` An individual sub-result

### Constructor Summary

Constructors
Constructor and Description
`CompositeResult(IResult... results)` Build a result out of several others

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`void` `addResult(IResult result)` Add one more result
`void` `addResult(String name, IResult result)` Add one more result with the given name
`boolean` `asHtml()` Whether to display the results as HTML.
`String` `getName()` Get the name of this whole report.
`List<CompositeResult.Entry>` `getResultEntries()` Get a list of the sub-results
`ResultMetaData` `getResultMetaData()` Get the metadata (none).
`List<IResult>` `getResults()` Deprecated. Use `getResultEntries()` instead
`ITestResult.Status` `getStatus()` A combined status
`boolean` `isEmpty()` See if there are sub-results
`void` `setAsHtml(boolean asHtml)` Change the HTML setting.
`void` `setName(String name)` Set the name of this whole report.
`void` `setStatus(ITestResult.Status status)` Set the combined status

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CompositeResult

    public CompositeResult(IResult... results)

Build a result out of several others

Parameters:
  `results` - a list of results

### Method Detail

#### getResultMetaData

    public ResultMetaData getResultMetaData()

Get the metadata (none).

Specified by:
  `getResultMetaData` in interface `IResult`
Returns:
  null

#### getResults

    @Deprecated
    public List<IResult> getResults()

Deprecated. Use `getResultEntries()` instead

Returns:
  the multiple results from a `CompositeResult`

#### 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

#### getStatus

    public ITestResult.Status getStatus()

A combined status

Returns:
  the status

#### 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