net.sf.jasperreports.crosstabs.fill.calculation

## Class MeasureDefinition.MeasureValue

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

- All Implemented Interfaces:
    JRCalculable
  Enclosing class:
    MeasureDefinition

      public class MeasureDefinition.MeasureValue
      extends java.lang.Object
      implements JRCalculable

  An accumulated value of a crosstab measure.
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Field Summary

    - ### Fields inherited from interface net.sf.jasperreports.engine.fill.JRCalculable

      `HELPER_COUNT, HELPER_SIZE, HELPER_SUM, HELPER_VARIANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MeasureDefinition.MeasureValue()` Initializes the value.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addValue(MeasureDefinition.MeasureValue measureValue)` Accumulates another measure value.
    `void` | `addValue(java.lang.Object addValue)` Accumulates a value.
    `JRCalculable` | `getHelperVariable(byte helperType)` Returns a helper variable.
    `java.lang.Object` | `getIncrementedValue()` Returns the incremented value of the calculable object.
    `java.lang.Object` | `getValue()` Returns the value of the calculable object.
    `protected void` | `init()`
    `boolean` | `isInitialized()` Returns `true` if and only if the calculable object was only initialized and not incremented.
    `MeasureDefinition.MeasureValue` | `setHelper(MeasureDefinition.MeasureValue helperVariable, byte type)` Sets a helper variable.
    `void` | `setInitialized(boolean isInitialized)` Sets the initialized flag for this calculable object.
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### MeasureDefinition.MeasureValue

          public MeasureDefinition.MeasureValue()

      Initializes the value.

  - ### Method Detail

    - #### init

          protected void init()

    - #### addValue

          public void addValue(java.lang.Object addValue)
                        throws JRException

      Accumulates a value.
      Parameters:
        `addValue` - the value
      Throws:
        `JRException`

    - #### addValue

          public void addValue(MeasureDefinition.MeasureValue measureValue)
                        throws JRException

      Accumulates another measure value.

      This is used for total calculations, when two accumulated values are combined into a total.

      Parameters:
        `measureValue` - the measure value
      Throws:
        `JRException`

    - #### getValue

          public java.lang.Object getValue()

      Description copied from interface: `JRCalculable`
      Returns the value of the calculable object.
      Specified by:
        `getValue` in interface `JRCalculable`
      Returns:
        the value

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### setHelper

          public MeasureDefinition.MeasureValue setHelper(MeasureDefinition.MeasureValue helperVariable,
                                                 byte type)

      Sets a helper variable.
      Parameters:
        `helperVariable` - the helper variable
        `type` - the helper type
      Returns:
        the previous helper variable for the type

    - #### isInitialized

          public boolean isInitialized()

      Description copied from interface: `JRCalculable`
      Returns `true` if and only if the calculable object was only initialized and not incremented.
      Specified by:
        `isInitialized` in interface `JRCalculable`
      Returns:
        `true` if and only if the calculable object was only initialized and not incremented

    - #### getIncrementedValue

          public java.lang.Object getIncrementedValue()

      Description copied from interface: `JRCalculable`
      Returns the incremented value of the calculable object.
      Specified by:
        `getIncrementedValue` in interface `JRCalculable`
      Returns:
        the incremented value

    - #### getHelperVariable

          public JRCalculable getHelperVariable(byte helperType)

      Description copied from interface: `JRCalculable`
      Returns a helper variable.
      Specified by:
        `getHelperVariable` in interface `JRCalculable`
      Parameters:
        `helperType` - the desired helper variable type
      Returns:
        the helper variable

    - #### setInitialized

          public void setInitialized(boolean isInitialized)

      Description copied from interface: `JRCalculable`
      Sets the initialized flag for this calculable object.
      Specified by:
        `setInitialized` in interface `JRCalculable`
      Parameters:
        `isInitialized` - the initialized flag
      See Also:
        `JRCalculable.isInitialized()`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com