Interface StatisticsProvider

All Known Implementing Classes:
CompositeStatisticsProvider, EmptyStatisticsProvider

public interface StatisticsProvider
Provider of statistics for the project.
  • Method Details

    • getStatistic

      default @NonNull Statistics getStatistic(@NonNull TranslationSource source)
      Gets the statistics by source.
      Parameters:
      source - the source
      Returns:
      the statistics
    • getStatistic

      @NonNull Statistics getStatistic(@NonNull org.eclipse.core.runtime.IPath path)
      Gets the statistics by path. If the path points to a file, it returns statistics on the resource file. If there are no statistics for this path in the store, then the computing of statistics for the resource should be started.
      Parameters:
      path - the path to the file must be TranslationSource, the file must exist
      Returns:
      the statistics
    • getGroupStatistic

      @NonNull Statistics getGroupStatistic(@NonNull org.eclipse.core.runtime.IPath path)
      Gets the group statistics. If the path points to a group, it returns statistics for the group. If there are no statistics for this path in the store, then the computing of statistics for the group should be started.
      Parameters:
      path - the path
      Returns:
      the group statistics
    • getTotalValueStatistic

      @NonNull Statistics getTotalValueStatistic()
      Gets the project statistics. If there are no total statistics in the store, then the computing of total statistics should be started.
      Returns:
      the statistics
    • statisticsIterator

      @NonNull Iterator<Pair<org.eclipse.core.runtime.IPath,Statistics>> statisticsIterator()
      Returns full project statistics.
      Returns:
      the complete statistics
    • getAvailableMetrics

      @NonNull Collection<Metric> getAvailableMetrics()
      Gets the available metrics.
      Returns:
      the available metrics