Class MeasureDefinition.MeasureValue

  • All Implemented Interfaces:
    JRCalculable
    Enclosing class:
    MeasureDefinition

    public class MeasureDefinition.MeasureValue
    extends Object
    implements JRCalculable
    An accumulated value of a crosstab measure.
    Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
    • Constructor Detail

      • MeasureValue

        public MeasureValue()
        Initializes the value.
    • Method Detail

      • init

        protected void init()
      • addValue

        public void addValue​(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 Object getValue()
        Description copied from interface: JRCalculable
        Returns the value of the calculable object.
        Specified by:
        getValue in interface JRCalculable
        Returns:
        the value
      • 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 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