Class IWeightedTreeProvider.MetricType
java.lang.Object
org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider.MetricType
- Enclosing interface:
- IWeightedTreeProvider<N,
E, T extends WeightedTree<N>>
This class associate a title to a data type for tree metrics
-
Constructor Summary
ConstructorDescriptionMetricType
(String title, IWeightedTreeProvider.DataType dataType, @Nullable Format format) ConstructorMetricType
(String title, IWeightedTreeProvider.DataType dataType, @Nullable Format format, boolean hasStatistics) Constructor -
Method Summary
Modifier and TypeMethodDescriptionFormats an object for this metricGet the type of data of this metricgetTitle()
Get the title of this metric, for the userboolean
Return whether this metric has statistics computed with it.
-
Constructor Details
-
MetricType
Constructor- Parameters:
title
- The title of this metric (a string meant for end users)dataType
- The type of data this metric representformat
- The formatter for this metric. Ifnull
, formatting will use theIWeightedTreeProvider.DataType
's default formatter
-
MetricType
public MetricType(String title, IWeightedTreeProvider.DataType dataType, @Nullable Format format, boolean hasStatistics) Constructor- Parameters:
title
- The title of this metric (a string meant for end users)dataType
- The type of data this metric representformat
- The formatter for this metric. Ifnull
, formatting will use theIWeightedTreeProvider.DataType
's default formatterhasStatistics
- Whether this metric has statistics provided with it
-
-
Method Details
-
getTitle
Get the title of this metric, for the user- Returns:
- The title
-
getDataType
Get the type of data of this metric- Returns:
- The data type of the metric
-
format
Formats an object for this metric- Parameters:
obj
- The object to format- Returns:
- The formatted string
-
hasStatistics
public boolean hasStatistics()Return whether this metric has statistics computed with it. If so, then callingIWeightedTreeProvider.getStatistics(WeightedTree, int)
on this metric's index should return a statistics object for a tree.- Returns:
- Whether this metric has statistics computed for it
-