Package org.eclipse.mat.query.refined
Class RefinedResultBuilder
java.lang.Object
org.eclipse.mat.query.refined.RefinedResultBuilder
This class allows the wrapping of a result to give another result which can be controlled more.
-
Constructor Summary
ConstructorDescriptionRefinedResultBuilder
(IQueryContext context, IStructuredResult subject) Build a suitable refined result given an input of IResultTable or IResultTree. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContextDerivedColumn
(ContextProvider provider, ContextDerivedData.DerivedOperation operation) void
Add a derived column such as for retained size.build()
Build the refined result (one time operation).int
getColumnIndexByName
(String columnName) Retrieve a column by name.Get all the columnsvoid
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.
-
Constructor Details
-
RefinedResultBuilder
Build a suitable refined result given an input of IResultTable or IResultTree.- Parameters:
context
- the context holding details about what was selected etc.subject
- the structured result
-
-
Method Details
-
getColumnIndexByName
Retrieve a column by name.- Parameters:
columnName
- the name of the column- Returns:
- the column of data
-
setSortOrder
Arrange to sort the table by a particular column.- Parameters:
columnIndex
- the index of the column to sort bydirection
- the direction to sort
-
setSortOrder
Arrange to sort the table by multiple columns.- Parameters:
indices
- the indices to sort bydirections
- the direction to sort each index by
-
addDefaultContextDerivedColumn
Add a derived column such as for retained size.- Parameters:
operation
- the extra operation for the new column
-
addContextDerivedColumn
public void addContextDerivedColumn(ContextProvider provider, ContextDerivedData.DerivedOperation operation) -
setFilter
Filter a particular column to only have partial data.- Parameters:
columnIndex
- the column of interestcriteria
- how to filter that column- Throws:
IllegalArgumentException
- for a bad criterion
-
getColumns
Get all the columns- Returns:
- An unmodifiable list of all the columns.
-
setInlineRetainedSizeCalculation
public void setInlineRetainedSizeCalculation(boolean inline) -
build
Build the refined result (one time operation). The builder is not reusable.- Returns:
- the refined result table or tree.
-