Iterator<Class<?>> iteratorClass = mapResources.keySet().iterator();
while (iteratorClass.hasNext() && getListMatching().size() < 10) {
Class<?> className = iteratorClass.next();
for (int i = 0; getListMatching().size() < 10
&& i < mapResources.get(className).size(); i++) {
Resource resource = mapResources.get(className).get(i);
addResource(className, resource);
}
}
return getListMatching();
}