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>>

public static class IWeightedTreeProvider.MetricType extends Object
This class associate a title to a data type for tree metrics
  • Constructor Details

    • MetricType

      public MetricType(String title, IWeightedTreeProvider.DataType dataType, @Nullable Format format)
      Constructor
      Parameters:
      title - The title of this metric (a string meant for end users)
      dataType - The type of data this metric represent
      format - The formatter for this metric. If null, formatting will use the IWeightedTreeProvider.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 represent
      format - The formatter for this metric. If null, formatting will use the IWeightedTreeProvider.DataType's default formatter
      hasStatistics - Whether this metric has statistics provided with it
  • Method Details

    • getTitle

      public String getTitle()
      Get the title of this metric, for the user
      Returns:
      The title
    • getDataType

      public IWeightedTreeProvider.DataType getDataType()
      Get the type of data of this metric
      Returns:
      The data type of the metric
    • format

      public String format(Object obj)
      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 calling IWeightedTreeProvider.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