Class MergeableMetricBase

    • Constructor Detail

      • MergeableMetricBase

        public MergeableMetricBase()
    • Method Detail

      • canMerge

        public boolean canMerge​(MergeableMetricBase other)
        Checks if this instance can be merged with another Other must have all the fields that this instance has, and the fields that are annotated as MergeByAssertEquals must contain the same value
        Parameters:
        other - metric that will be merged into this one.
        Returns:
        true if the other metric can be merged into this one.
      • mergeIfCan

        public boolean mergeIfCan​(MergeableMetricBase other)
        Merges another MergableMetricBase if possible
        Parameters:
        other - another MergableMetricBase instance to merge, must of the same class as this.
        Returns:
        true if the other metric can be merged into this one.
      • calculateDerivedFields

        public void calculateDerivedFields()
        Placeholder method that will calculate the derived fields from the other ones. Classes that are derived from non-trivial derived classes should consider calling super.calculateDerivedFields() as well. Fields whose value will change due to this method should be annotated with NoMergingKeepsValue.