hudson.plugins.cobertura.targets
Enum CoverageAggregationMode

java.lang.Object
  extended by java.lang.Enum<CoverageAggregationMode>
      extended by hudson.plugins.cobertura.targets.CoverageAggregationMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CoverageAggregationMode>

public enum CoverageAggregationMode
extends java.lang.Enum<CoverageAggregationMode>

Different ways of aggregating data series {x_1,x_2,x_3,...}, which can be represented as f(...f(f(ZERO,x_1),x_2)...,x_n)

Since:
22-Aug-2007 18:07:35
Author:
Stephen Connolly

Enum Constant Summary
COUNT_NON_ZERO
          Treat (0/0) as "no data", then compute "# of non-zero data/# of data."
NONE
          Aggregation that doesn't produce any value at all.
PRODUCT
          x_1 * x_2 * x_3 + ...
SUM
          Adds up numerator and denominator separately.
 
Field Summary
 Ratio ZERO
          Initial value of this aggregation mode, which is the output of the aggregation when the data series is empty.
 
Method Summary
abstract  Ratio aggregate(Ratio a, Ratio b)
          Combinator function.
static CoverageAggregationMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CoverageAggregationMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final CoverageAggregationMode NONE
Aggregation that doesn't produce any value at all.


SUM

public static final CoverageAggregationMode SUM
Adds up numerator and denominator separately. Say if you want to count the ratio of male among the population in a state from a series of those ratios per county, this is how you add them up.


PRODUCT

public static final CoverageAggregationMode PRODUCT
x_1 * x_2 * x_3 + ...


COUNT_NON_ZERO

public static final CoverageAggregationMode COUNT_NON_ZERO
Treat (0/0) as "no data", then compute "# of non-zero data/# of data."

Field Detail

ZERO

public final Ratio ZERO
Initial value of this aggregation mode, which is the output of the aggregation when the data series is empty.

Method Detail

values

public static CoverageAggregationMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CoverageAggregationMode c : CoverageAggregationMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CoverageAggregationMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

aggregate

public abstract Ratio aggregate(Ratio a,
                                Ratio b)
Combinator function. Note that this function is defined to be left-associative and f(x,y) isn't necessarily the same as f(y,x)



Copyright © 2004-2011. All Rights Reserved.