- List<NormalizedNodeMessages.PathArgumentAttribute> attributes =
- new ArrayList<>();
-
- YangInstanceIdentifier.NodeIdentifierWithPredicates identifier
- = (YangInstanceIdentifier.NodeIdentifierWithPredicates) pathArgument;
-
- for (QName key : identifier.getKeyValues().keySet()) {
- Object value = identifier.getKeyValues().get(key);
- NormalizedNodeMessages.PathArgumentAttribute attribute =
- buildAttribute(context, key, value);
+ Map<QName, Object> keyValues = identifier.getKeyValues();
+ List<NormalizedNodeMessages.PathArgumentAttribute> attributes = new ArrayList<>(keyValues.size());
+ for (Entry<QName, Object> e : keyValues.entrySet()) {
+ NormalizedNodeMessages.PathArgumentAttribute attribute = buildAttribute(context, e.getKey(),
+ e.getValue());