package org.opendaylight.yangtools.yang.data.impl.schema;
import static com.google.common.base.Preconditions.checkNotNull;
-
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
-import com.google.common.collect.Iterables;
import java.util.Map;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.ModifyAction;
@Override
public NormalizedNode<?, ?> create(final YangInstanceIdentifier instanceId, final Optional<NormalizedNode<?, ?>> deepestChild, final Optional<Map.Entry<QName,ModifyAction>> operation) {
checkNotNull(instanceId);
- final YangInstanceIdentifier.PathArgument pathArgument = Iterables.get(instanceId.getPathArguments(), 0);
+ final YangInstanceIdentifier.PathArgument pathArgument = instanceId.getPathArguments().get(0);
final NormalizedNodeAttrBuilder<? extends YangInstanceIdentifier.PathArgument, Object, ? extends NormalizedNode<? extends YangInstanceIdentifier.PathArgument, Object>> builder = getBuilder(pathArgument);
if(deepestChild.isPresent()) {
protected NormalizedNodeAttrBuilder<YangInstanceIdentifier.NodeIdentifier, Object, LeafNode<Object>> getBuilder(final YangInstanceIdentifier.PathArgument node) {
return Builders.leafBuilder().withNodeIdentifier(getIdentifier());
}
+
+ @Override
+ boolean isMixin() {
+ return false;
+ }
}
static final class LeafListEntryNormalization extends InstanceIdToSimpleNodes<YangInstanceIdentifier.NodeWithValue> {
return Builders.leafSetEntryBuilder().withNodeIdentifier((YangInstanceIdentifier.NodeWithValue) node).withValue(((YangInstanceIdentifier.NodeWithValue) node).getValue());
}
+ @Override
+ boolean isMixin() {
+ return false;
+ }
}
}