Interface OperationStatistic<T extends Enum<T>>

All Superinterfaces:
OperationObserver<T>, SourceStatistic<ChainedOperationObserver<? super T>>
All Known Implementing Classes:
AbstractOperationStatistic, GeneralOperationStatistic, MappedOperationStatistic, StatisticMapper, ZeroOperationStatistic

public interface OperationStatistic<T extends Enum<T>> extends OperationObserver<T>, SourceStatistic<ChainedOperationObserver<? super T>>
  • Method Details

    • type

      Class<T> type()
    • statistic

      default ValueStatistic<Long> statistic(T result)
      Return a ValueStatistic returning the count for the given result.
      Parameters:
      result - the result of interest
      Returns:
      a ValueStatistic instance
    • statistic

      default ValueStatistic<Long> statistic(Set<T> results)
    • count

      long count(T type)
      Return the count of operations with the given type.
      Parameters:
      type - the result type
      Returns:
      the operation count
    • sum

      long sum(Set<T> types)
    • sum

      long sum()