org.eclipse.mat.query.refined
Class RefinedResultBuilder

java.lang.Object
  extended by org.eclipse.mat.query.refined.RefinedResultBuilder

public final class RefinedResultBuilder
extends java.lang.Object

This class allows the wrapping of a result to give another result which can be controlled more.


Constructor Summary
RefinedResultBuilder(IQueryContext context, IStructuredResult subject)
          Build a suitable refined result given an input of IResultTable or IResultTree.
 
Method Summary
 void addContextDerivedColumn(ContextProvider provider, ContextDerivedData.DerivedOperation operation)
           
 void addDefaultContextDerivedColumn(ContextDerivedData.DerivedOperation operation)
          Add a derived column such as for retained size.
 RefinedStructuredResult build()
          Build the refined result (one time operation).
 int getColumnIndexByName(java.lang.String columnName)
          Retrieve a column by name.
 java.util.List<Column> getColumns()
          Get all the columns
 void setFilter(int columnIndex, java.lang.String criteria)
          Filter a particular column to only have partial data.
 void setInlineRetainedSizeCalculation(boolean inline)
           
 void setSortOrder(int[] indices, Column.SortDirection[] directions)
          Arrange to sort the table by multiple columns.
 void setSortOrder(int columnIndex, Column.SortDirection direction)
          Arrange to sort the table by a particular column.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RefinedResultBuilder

public RefinedResultBuilder(IQueryContext context,
                            IStructuredResult subject)
Build a suitable refined result given an input of IResultTable or IResultTree.

Parameters:
context -
subject - the structured result
Method Detail

getColumnIndexByName

public int getColumnIndexByName(java.lang.String columnName)
Retrieve a column by name.

Parameters:
columnName -
Returns:
the column of data

setSortOrder

public void setSortOrder(int columnIndex,
                         Column.SortDirection direction)
Arrange to sort the table by a particular column.

Parameters:
columnIndex -
direction -

setSortOrder

public void setSortOrder(int[] indices,
                         Column.SortDirection[] directions)
Arrange to sort the table by multiple columns.

Parameters:
indices -
directions -

addDefaultContextDerivedColumn

public void addDefaultContextDerivedColumn(ContextDerivedData.DerivedOperation operation)
Add a derived column such as for retained size.

Parameters:
operation -

addContextDerivedColumn

public void addContextDerivedColumn(ContextProvider provider,
                                    ContextDerivedData.DerivedOperation operation)

setFilter

public void setFilter(int columnIndex,
                      java.lang.String criteria)
               throws java.lang.IllegalArgumentException
Filter a particular column to only have partial data.

Parameters:
columnIndex -
criteria -
Throws:
java.lang.IllegalArgumentException

getColumns

public java.util.List<Column> getColumns()
Get all the columns

Returns:
An unmodifiable list of all the columns.

setInlineRetainedSizeCalculation

public void setInlineRetainedSizeCalculation(boolean inline)

build

public RefinedStructuredResult build()
Build the refined result (one time operation). The builder is not reusable.

Returns:
the refined result table or tree.