public Iterable<Metric> metrics() {
        return new Iterable<Metric>() {

            final Iterator<Metric> it = delegate.metrics().iterator();

            public Iterator<Metric> iterator() {
                return new TryIterator<Metric>() {

                    public Metric tryNext() {
                        if (it.hasNext()) do {
                            Metric next = it.next();
                            if (filter.accepts(next.name())) {
                                return next;
                            }
                        } while (it.hasNext());
                        return done();
                    }
                };
            }
        };
    }