Package 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
Modifier and Type
Class
Description
`static class`
`CompositeResult.Entry`
An individual sub-result

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`void`
`addResult(String name, IResult result)`
Add one more result with the given name
`void`
`addResult(IResult result)`
Add one more result
`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 Details

### CompositeResult

public CompositeResult(IResult... results)
Build a result out of several others

Parameters:
  `results` - a list of results

## Method Details

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