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
Modifier and Type
Class
Description
`static enum`
`SimpleComparison.Retained`

## Field Summary

Fields
Modifier and Type
Field
Description
`ISnapshot`
`baseline`
`String`
`defaultoptions`
`String`
`options`
`String`
`query`
`SimpleComparison.Retained`
`retained`
`ISnapshot`
`snapshot`

## Constructor Summary

Constructors
Constructor
Description
`SimpleComparison()`

## Method Summary

Modifier and Type
Method
Description
`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 Details

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

### SimpleComparison

public SimpleComparison()

## Method Details

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