Class BaseStatistic

java.lang.Object
com.arpnetworking.metrics.mad.model.statistics.BaseStatistic
All Implemented Interfaces:
Statistic, Serializable
Direct Known Subclasses:
CountStatistic, ExpressionStatistic, HistogramStatistic, MaxStatistic, MeanStatistic, MinStatistic, SumStatistic, TPStatistic

public abstract class BaseStatistic extends Object implements Statistic
A statistic base class.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot io)
See Also:
  • Constructor Details

    • BaseStatistic

      public BaseStatistic()
  • Method Details

    • getAliases

      public Set<String> getAliases()
      Description copied from interface: Statistic
      Accessor for any aliases of the statistic.
      Specified by:
      getAliases in interface Statistic
      Returns:
      The aliases of the statistic.
    • getDependencies

      public Set<Statistic> getDependencies()
      Description copied from interface: Statistic
      Accessor for any dependencies.
      Specified by:
      getDependencies in interface Statistic
      Returns:
      The Set of Statistic dependencies.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • assertUnit

      protected static void assertUnit(Optional<Unit> newUnit, Optional<Unit> existingUnit, boolean hasData)
      Assert that the new unit is compatible with the existing unit.
      Parameters:
      newUnit - the new unit under consideration
      existingUnit - the unit encountered previously
      hasData - whether data has been processed