public Any mapBuilder()

in api/src/main/java/com/spotify/metrics/core/MetricIdCache.java [339:356]


        public Any mapBuilder(final MapBuilder mapBuilder) {
            if (mapBuilder == null) {
                throw new IllegalArgumentException("'mapBuilder' must not be null");
            }

            return new Any(metricId, new CacheBuilder() {
                @Override
                public <T> Cache<T> build(Loader<T> loader) {
                    final ConcurrentMap<T, MetricId> map = mapBuilder.build();

                    if (map == null) {
                        throw new IllegalStateException("'mapBuilder' must not return null");
                    }

                    return new ConcurrentMapCache<T>(map, loader);
                }
            });
        }