Package org.eclipse.mat.inspections

## Class SimpleComparison

- java.lang.Object
- - org.eclipse.mat.inspections.SimpleComparison

All Implemented Interfaces:
  `IQuery`

    public class SimpleComparison
    extends Object
    implements IQuery

A simple comparison of the results of running a query on two different snapshots.

### Nested Class Summary

Nested Classes
`static class` `SimpleComparison.Retained`

### Field Summary

Fields
`ISnapshot` `baseline`
`String` `defaultoptions`
`String` `options`
`String` `query`
`SimpleComparison.Retained` `retained`
`ISnapshot` `snapshot`

### Constructor Summary

Constructors
`SimpleComparison()`

### Method Summary

All Methods Instance Methods Concrete Methods
`IResult` `execute​(IProgressListener listener)` The execute method is called after all arguments have been injected into the query instance.

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

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

### Field Detail

#### snapshot

    public ISnapshot snapshot

#### baseline

    public ISnapshot baseline

#### query

    public String query

#### options

    public String options

#### defaultoptions

    public String defaultoptions

#### retained

    public SimpleComparison.Retained retained

### Constructor Detail

#### SimpleComparison

    public SimpleComparison()

### Method Detail

#### execute

    public IResult execute​(IProgressListener listener)
                    throws Exception

Description copied from interface: `IQuery`
The execute method is called after all arguments have been injected into the query instance. Typical results are `TextResult`, `CompositeResult`, `SectionSpec` etc.

Specified by:
  `execute` in interface `IQuery`
Parameters:
  `listener` - Monitor to report progress and check for cancellation.
Returns:
  The result of the query.
Throws:
  `Exception` - if something went wrong running the query