Class FlowableExpressionMathUtils

java.lang.Object
com.flowable.platform.expressions.FlowableExpressionMathUtils

public class FlowableExpressionMathUtils extends Object
Expression Bean Name: flw.math Provides a number of mathematical operations. Please note that all operations will return a number of type @{link Double}.
  • Constructor Details

    • FlowableExpressionMathUtils

      public FlowableExpressionMathUtils()
  • Method Details

    • sum

      public double sum(Collection<Double> numbers)
      Sums up a list of numbers.
      Parameters:
      numbers - The numbers to be summed
      Returns:
      The sum
    • average

      public double average(Collection<Double> numbers)
      Calculates the averages of a list of numbers.
      Parameters:
      numbers - The numbers to calculate the average of
      Returns:
      The average of the numbers
    • floor

      public double floor(double number)
      Returns the next lower integer of a provided number.
      Parameters:
      number - The number to be rounded
      Returns:
      The rounded down number
    • ceil

      public double ceil(double number)
      Returns the next higher integer of a provided number.
      Parameters:
      number - The number to be rounded
      Returns:
      The rounded up number
    • round

      public double round(double number)
      Rounds a number,
      Parameters:
      number - The number to be rounded
      Returns:
      The next higher or lower number depending on the value of the provided number.
    • round

      public double round(double number, int scale)
      Round a number to a maximum of decimal places using RoundingMode.HALF_UP
      Parameters:
      number - The number to round
      scale - The number of decimal places to return
      Returns:
      The rounded number
    • min

      public double min(Collection<Double> numbers)
      Returns the lowest number from a list of numbers.
      Parameters:
      numbers - The numbers to find the lowest number of
      Returns:
      The lowest number
    • max

      public double max(Collection<Double> numbers)
      Returns the highest number from a list of numbers.
      Parameters:
      numbers - The numbers to find the highest number of
      Returns:
      The highest number
    • abs

      public double abs(double number)
      Returns the absolute value of a number.
      Parameters:
      number - Number of find the absolute value of
      Returns:
      The absolute value
    • median

      public double median(Collection<Double> numbers)
      Returns the median of a list of numbers.
      Parameters:
      numbers - The numbers to find the median of
      Returns:
      The median value
    • parseDouble

      public double parseDouble(String string)
      Convert a string to a double value
      Parameters:
      string - The string value
      Returns:
      A double value
    • parseInt

      public int parseInt(String string)
      Convert a string to a double value
      Parameters:
      string - The string value
      Returns:
      An int value