public static <T, R> Function<T, R> monitor(Function<T, R> function, AtomicLong calls) {
        return new MonitoringFunction<>(function, calls);
    }
public static < T , R > Function < T , R > monitor ( Function < T , R > function , AtomicLong calls ) { return new MonitoringFunction < > ( function , calls ) ; }
Monitors calls to a function.

@param <T> the function parameter type
@param <R> the function result type
@param function the function that will be monitored
@param calls a value holder accumulating calls
@return the proxied function