public static BigDecimal sum ( EvaluationContext ctx , Object ... args ) { if ( args . length == 0 ) { throw new RuntimeException ( "Wrong number of arguments" ) ; } BigDecimal result = BigDecimal . ZERO ; for ( Object arg : args ) { result = result . add ( Conversions . toDecimal ( arg , ctx ) ) ; } return result ; }
Returns the sum of all arguments