for (final Check check : checks) {
Iterator<Metric> metricByName = Iterables.filter(metrics, new FindByName(check.getName())).iterator();
if (metricByName.hasNext()) {
Metric found = metricByName.next();
CheckRunner runner = checkRunnerFactory.create(check, found.getValue());
runner.run();
}
}
}
private static class FindByName implements Predicate<Metric> {