Package org.eclipse.mat.query

## Interface ContextDerivedData.DerivedCalculator

Enclosing class:
  ContextDerivedData

    public static interface ContextDerivedData.DerivedCalculator

A way of actually doing the calculations.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `calculate​(ContextDerivedData.DerivedOperation operation, java.lang.Object row, IProgressListener listener)` Do the calculation for the row.
`java.lang.Object` `lookup​(java.lang.Object row)` Get the results of the calculation from the row.

### Method Detail

#### lookup

    java.lang.Object lookup​(java.lang.Object row)

Get the results of the calculation from the row. Allows some caching.

Parameters:
  `row` - the row
Returns:
  the result, perhaps a Long for retained size

#### calculate

    void calculate​(ContextDerivedData.DerivedOperation operation,
                   java.lang.Object row,
                   IProgressListener listener)
            throws SnapshotException

Do the calculation for the row. Save the result in the row or elsewhere, ready for `lookup(Object)`

Parameters:
  `operation` - the operation to do on the row to get the derived data
  `row` - the row
  `listener` - to indicate progress and exceptions
Throws:
  `SnapshotException` - if there was a problem with the calculation