package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml;
import com.google.common.collect.Lists;
+import java.util.List;
import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
import org.opendaylight.controller.netconf.util.xml.XmlElement;
-import java.util.List;
-
public class ArrayAttributeReadingStrategy extends AbstractAttributeReadingStrategy {
private final AttributeReadingStrategy innerStrategy;
@Override
AttributeConfigElement readElementHook(List<XmlElement> configNodes) throws NetconfDocumentedException {
List<Object> innerList = Lists.newArrayList();
- for (int i = 0; i < configNodes.size(); i++) {
- innerList.add(innerStrategy.readElement(Lists.newArrayList(configNodes.get(i))).getValue());
+ for (XmlElement configNode : configNodes) {
+ innerList.add(innerStrategy.readElement(Lists.newArrayList(configNode)).getValue());
}
return AttributeConfigElement.create(getNullableDefault(), innerList);
}