java.lang.Object
dev.metaschema.core.metapath.function.library.FnAvg

public final class FnAvg extends Object
Implements the XPath 3.1 fn:avg function.
  • Method Details

    • average

      @Nullable public static IAnyAtomicItem average(@NonNull Collection<? extends IAnyAtomicItem> items)
      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