Class AverageExpression

  • All Implemented Interfaces:
    Serializable, Cloneable, Expression

    public class AverageExpression
    extends AbstractExpression
    Deprecated.
    this has been replaced by the ColumnAverageExpression.
    An expression that takes values from one or more fields and returns the average of them.
    Author:
    Thomas Morgner
    See Also:
    Serialized Form
    • Constructor Detail

      • AverageExpression

        public AverageExpression()
        Deprecated.
        Creates a new expression. The fields used by the expression are defined using properties named '0', '1', ... 'N'. These fields should contain Number instances.
    • Method Detail

      • getRoundingMode

        public int getRoundingMode()
        Deprecated.
        Returns the defined rounding mode. This influences the precision of the divide-operation.
        Returns:
        the rounding mode.
        See Also:
        BigDecimal.divide(java.math.BigDecimal, int)
      • setRoundingMode

        public void setRoundingMode​(int roundingMode)
        Deprecated.
        Defines the rounding mode. This influences the precision of the divide-operation.
        Parameters:
        roundingMode - the rounding mode.
        See Also:
        BigDecimal.divide(java.math.BigDecimal, int)
      • getScale

        public int getScale()
        Deprecated.
        Returns the scale for the divide-operation. The scale influences the precision of the division.
        Returns:
        the scale.
      • setScale

        public void setScale​(int scale)
        Deprecated.
        Defines the scale for the divide-operation. The scale influences the precision of the division.
        Parameters:
        scale - the scale.
      • getValue

        public Object getValue()
        Deprecated.
        Returns the average of the values.
        Returns:
        a BigDecimal instance.
      • getField

        public String[] getField()
        Deprecated.
        Returns the defined fields as array.
        Returns:
        the fields
      • setField

        public void setField​(String[] fields)
        Deprecated.
        Defines all fields as array. This completely replaces any previously defined fields.
        Parameters:
        fields - the new list of fields.
      • getField

        public String getField​(int index)
        Deprecated.
        Returns the defined field at the given index-position.
        Parameters:
        index - the position of the field name that should be queried.
        Returns:
        the field name at the given position.
      • setField

        public void setField​(int index,
                             String field)
        Deprecated.
        Defines the field in the field-list at the given index.
        Parameters:
        index - the position in the list, where the field should be defined.
        field - the name of the field.
      • getFieldCount

        public int getFieldCount()
        Deprecated.
        Returns the number of fields defined in this expression.
        Returns:
        the number of fields.