@SuppressWarnings("unchecked")
  static <T> CriteriaCreator<T> creator() {
    class Local extends AbstractContextHolder implements Aggregation<T>, Matcher {
      private Local(CriteriaContext context) {
        super(context);
      }
    }

    return ctx -> (T) new Local(ctx);
  }
Used to provide aggregation template for numeric types (eg. {@link Number}).
@param <MINMAX> type of min/max value(s). Can be optional type.
@param <SUM> type of the sum computation. Can be optional type.
@param <AVG> type of the average computation. Can be optional type.
criteria/common/src/org/immutables/criteria/matcher/Aggregation.java