net.sf.jasperreports.crosstabs.fill.calculation

## Class MeasureDefinition

- java.lang.Object
- - net.sf.jasperreports.crosstabs.fill.calculation.MeasureDefinition

-     public class MeasureDefinition
      extends java.lang.Object

  Crosstab measure definition.
  Version:
    $Id: MeasureDefinition.java 5877 2013-01-07 19:51:14Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `MeasureDefinition.MeasureValue` An accumulated value of a crosstab measure.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected CalculationEnum` | `calculation`
    `protected JRExtendedIncrementerFactory` | `incrementerFactory`
    `protected boolean` | `isSystemDefined`
    `protected static AbstractValueProvider` | `VALUE_PROVIDER` Measure value provider.
    `protected java.lang.Class<?>` | `valueClass`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `MeasureDefinition(java.lang.Class<?> valueClass, CalculationEnum calculation, JRExtendedIncrementerFactory incrementerFactory)` Create a measure definition.
    `protected` | `MeasureDefinition(java.lang.Class<?> valueClass, CalculationEnum calculation, JRExtendedIncrementerFactory incrementerFactory, boolean isSystemDefined)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MeasureDefinition` | `createDistinctCountHelperMeasure(MeasureDefinition measure)` Creates a helper measure for a distinct count calculation.
    `static MeasureDefinition` | `createHelperMeasure(MeasureDefinition measure, CalculationEnum helperCalculation)` Creates a helper measure for a specific calculation.
    `CalculationEnum` | `getCalculation()` Returns the calculation type.
    `JRExtendedIncrementer` | `getIncrementer()` Returns the incrementer used for this measure.
    `JRExtendedIncrementerFactory` | `getIncrementerFactory()` Returns the incrementer factory.
    `java.lang.Class<?>` | `getValueClass()` Returns the measure value class.
    `protected boolean` | `isSystemDefined()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### calculation

          protected CalculationEnum calculation

    - #### incrementerFactory

          protected final JRExtendedIncrementerFactory incrementerFactory

    - #### valueClass

          protected final java.lang.Class<?> valueClass

    - #### isSystemDefined

          protected final boolean isSystemDefined

    - #### VALUE_PROVIDER

          protected static final AbstractValueProvider VALUE_PROVIDER

      Measure value provider.

  - ### Constructor Detail

    - #### MeasureDefinition

          public MeasureDefinition(java.lang.Class<?> valueClass,
                           CalculationEnum calculation,
                           JRExtendedIncrementerFactory incrementerFactory)

      Create a measure definition.
      Parameters:
        `valueClass` - the value class
        `calculation` - the calculation type
        `incrementerFactory` - the incrementer factory

    - #### MeasureDefinition

          protected MeasureDefinition(java.lang.Class<?> valueClass,
                           CalculationEnum calculation,
                           JRExtendedIncrementerFactory incrementerFactory,
                           boolean isSystemDefined)

  - ### Method Detail

    - #### createHelperMeasure

          public static MeasureDefinition createHelperMeasure(MeasureDefinition measure,
                                              CalculationEnum helperCalculation)

      Creates a helper measure for a specific calculation.
      Parameters:
        `measure` - the measure
        `helperCalculation` - the calculation
      Returns:
        the helper measure having the specified calculation

    - #### createDistinctCountHelperMeasure

          public static MeasureDefinition createDistinctCountHelperMeasure(MeasureDefinition measure)

      Creates a helper measure for a distinct count calculation.
      Parameters:
        `measure` - the measure
      Returns:
        the helper measure having the specified calculation

    - #### getCalculation

          public CalculationEnum getCalculation()

      Returns the calculation type.
      Returns:
        the calculation type

    - #### getIncrementerFactory

          public JRExtendedIncrementerFactory getIncrementerFactory()

      Returns the incrementer factory.
      Returns:
        the incrementer factory

    - #### getIncrementer

          public JRExtendedIncrementer getIncrementer()

      Returns the incrementer used for this measure.
      Returns:
        the incrementer used for this measure

    - #### isSystemDefined

          protected boolean isSystemDefined()

    - #### getValueClass

          public java.lang.Class<?> getValueClass()

      Returns the measure value class.
      Returns:
        the measure value class

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com