Package org.eclipse.mat.query
Class Column
java.lang.Object
org.eclipse.mat.query.Column
Describes a column of a
IStructuredResult
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Alignment of the column, i.e.static enum
Sort direction of the column. -
Constructor Summary
ConstructorDescriptionBuild a column with the given label.Build a column with the given label.Column
(String label, Class<?> type, Column.Alignment align, Column.SortDirection direction, Format formatter, Comparator<?> comparator) Build a column with the given label. -
Method Summary
Modifier and TypeMethodDescriptionaligning
(Column.Alignment align) Alignment of the column.comparing
(Comparator<?> comparator) Comparator to sort the column.decorator
(IDecorator decorator) Add a decorator to a columnboolean
formatting
(Format formatter) Formatter to format the column values.getAlign()
boolean
Comparator<?>
getLabel()
Class<?>
getType()
int
hashCode()
boolean
Returns true if the columns represents a numeric type, i.e.noTotals()
Indicates that no totals are to be calculated for the column even if the column contains numbers.sorting
(Column.SortDirection direction) Initial sort direction of the column.toString()
-
Constructor Details
-
Column
Build a column with the given label.- Parameters:
label
- the top of the column
-
Column
Build a column with the given label.- Parameters:
label
- the top of the columntype
- a type of the column, such as float, int, Double
-
Column
public Column(String label, Class<?> type, Column.Alignment align, Column.SortDirection direction, Format formatter, Comparator<?> comparator) Build a column with the given label.- Parameters:
label
- the top of the columntype
- a type of the column, such as float, int, Doublealign
- cell alignment - seeColumn.Alignment
for the choicesdirection
- sorting directionformatter
- how to display itemscomparator
- how to sort the items
-
-
Method Details
-
formatting
Formatter to format the column values.- Parameters:
formatter
- the formatter- Returns:
- the original column to allow chaining
-
aligning
Alignment of the column.- Parameters:
align
- the alignment- Returns:
- the original column to allow chaining
-
comparing
Comparator to sort the column. The row object will be passed to the comparator!- Parameters:
comparator
- the comparator for sorting- Returns:
- the original column to allow chaining
-
sorting
Initial sort direction of the column.- Parameters:
direction
- the initial direction- Returns:
- the original column to allow chaining
-
noTotals
Indicates that no totals are to be calculated for the column even if the column contains numbers.- Returns:
- the original column to allow chaining
-
decorator
Add a decorator to a column- Parameters:
decorator
- the decorator to allow a prefix or suffix- Returns:
- the original column to allow chaining
-
getType
-
getAlign
-
getSortDirection
-
getLabel
-
getComparator
-
getFormatter
-
getCalculateTotals
public boolean getCalculateTotals() -
getDecorator
-
isNumeric
public boolean isNumeric()Returns true if the columns represents a numeric type, i.e. if it is assignable to number or one of the primitive numeric types.- Returns:
- true if numeric
-
setData
-
getData
-
toString
-
hashCode
public int hashCode() -
equals
-