org.eclipse.mat.query
Interface ContextDerivedData.DerivedCalculator

Enclosing class:
ContextDerivedData

public static interface ContextDerivedData.DerivedCalculator

A way of actually doing the calculations.


Method Summary
 void calculate(ContextDerivedData.DerivedOperation operation, Object row, IProgressListener listener)
          Do the calculation for the row.
 Object lookup(Object row)
          Get the results of the calculation from the row.
 

Method Detail

lookup

Object lookup(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,
               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