private Resource getNextResource() {
      while (iterator.hasNext()) {
        Resource next = iterator.next();
        if (predicate == null || evaluator.evaluate(predicate, next)) {
          return next;
        }
      }
      return null;
    }
Get the next resource.

@return the next resource.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java