2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.data.impl.schema.tree;
10 import java.util.Optional;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
14 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodeContainer;
15 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode;
16 import org.opendaylight.yangtools.yang.data.api.schema.tree.ModificationType;
18 final class RecursiveUnmodifiedCandidateNode extends AbstractRecursiveCandidateNode {
19 protected RecursiveUnmodifiedCandidateNode(
20 final NormalizedNodeContainer<?, PathArgument, NormalizedNode<?, ?>> data) {
26 public ModificationType getModificationType() {
27 return ModificationType.UNMODIFIED;
32 public Optional<NormalizedNode<?, ?>> getDataAfter() {
33 return dataOptional();
38 public Optional<NormalizedNode<?, ?>> getDataBefore() {
39 return dataOptional();
43 DataTreeCandidateNode createContainer(
44 final NormalizedNodeContainer<?, PathArgument, NormalizedNode<?, ?>> childData) {
45 return new RecursiveUnmodifiedCandidateNode(childData);
49 DataTreeCandidateNode createLeaf(final NormalizedNode<?, ?> childData) {
50 return new UnmodifiedLeafCandidateNode(childData);