void (PropertiesProvider propertiesProvider) { boolean found = false; for (Iterator<String> it = propertiesProvider.getNamesIterator(); it.hasNext();) { final String providerProperty = it.next(); myVariants.add(providerProperty); if (myPropertyName.equals(providerProperty)) { found = true; } } if (found) { myResult = propertiesProvider; stop(); } }