import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.yangtools.util.ImmutableMapTemplate;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
@Override
public DataContainerNodeBuilder<NodeIdentifierWithPredicates, MapEntryNode> withChild(
- final DataContainerChild<?, ?> child) {
+ final DataContainerChild child) {
validator.validateChild(child.getIdentifier());
return super.withChild(child);
}
final Object[] values = new Object[childrenQNamesToPaths.size()];
int offset = 0;
for (Entry<QName, PathArgument> entry : childrenQNamesToPaths.entrySet()) {
- values[offset++] = nonnullKeyValue(entry.getKey(), getChild(entry.getValue())).getValue();
+ values[offset++] = nonnullKeyValue(entry.getKey(), getChild(entry.getValue())).body();
}
return ImmutableMapTemplate.ordered(childrenQNamesToPaths.keySet()).instantiateWithValues(values);
}
final Object[] values = new Object[keys.size()];
int offset = 0;
for (QName key : keys) {
- values[offset++] = nonnullKeyValue(key, getChild(childrenQNamesToPaths.get(key))).getValue();
+ values[offset++] = nonnullKeyValue(key, getChild(childrenQNamesToPaths.get(key))).body();
}
return ImmutableMapTemplate.ordered(keys).instantiateWithValues(values);
}
- private DataContainerChild<?, ?> nonnullKeyValue(final QName key, final DataContainerChild<?, ?> value) {
+ private DataContainerChild nonnullKeyValue(final QName key, final @Nullable DataContainerChild value) {
if (value != null) {
return value;
}