java.lang.Object
dev.metaschema.core.metapath.function.library.FnAvg
Implements the XPath 3.1
fn:avg
function.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IAnyAtomicItemaverage(Collection<? extends IAnyAtomicItem> items) An implementation of XPath 3.1 fn:avg.static IDayTimeDurationItemaverageDayTimeDurations(Collection<? extends IDayTimeDurationItem> items) Get the average of a collection of day/time duration-based items.static IDecimalItemaverageNumeric(Collection<? extends INumericItem> items) Get the average of a collection of numeric items.static IYearMonthDurationItemaverageYearMonthDurations(Collection<? extends IYearMonthDurationItem> items) Get the average of a collection of year/month duration-based items.
-
Method Details
-
average
An implementation of XPath 3.1 fn:avg.- Parameters:
items- the items to average- Returns:
- the average
-
averageDayTimeDurations
@NonNull public static IDayTimeDurationItem averageDayTimeDurations(@NonNull Collection<? extends IDayTimeDurationItem> items) Get the average of a collection of day/time duration-based items.- Parameters:
items- the Metapath items to average- Returns:
- the average
-
averageYearMonthDurations
@NonNull public static IYearMonthDurationItem averageYearMonthDurations(@NonNull Collection<? extends IYearMonthDurationItem> items) Get the average of a collection of year/month duration-based items.- Parameters:
items- the Metapath items to average- Returns:
- the average
-
averageNumeric
@NonNull public static IDecimalItem averageNumeric(@NonNull Collection<? extends INumericItem> items) Get the average of a collection of numeric items.- Parameters:
items- the Metapath items to average- Returns:
- the average
-