Class Average
- java.lang.Object
-
- com.jayway.jsonpath.internal.function.numeric.AbstractAggregation
-
- com.jayway.jsonpath.internal.function.numeric.Average
-
- All Implemented Interfaces:
PathFunction
public class Average extends AbstractAggregation
Provides the average of a series of numbers in a JSONArray Created by mattg on 6/26/15.
-
-
Constructor Summary
Constructors Constructor Description Average()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.NumbergetValue()Obtains the value generated via the series of next value callsprotected voidnext(java.lang.Number value)Defines the next value in the array to the mathmatical function-
Methods inherited from class com.jayway.jsonpath.internal.function.numeric.AbstractAggregation
invoke
-
-
-
-
Method Detail
-
next
protected void next(java.lang.Number value)
Description copied from class:AbstractAggregationDefines the next value in the array to the mathmatical function- Specified by:
nextin classAbstractAggregation- Parameters:
value- The numerical value to process next
-
getValue
protected java.lang.Number getValue()
Description copied from class:AbstractAggregationObtains the value generated via the series of next value calls- Specified by:
getValuein classAbstractAggregation- Returns:
- A numerical answer based on the input value provided
-
-