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 com.google.common.base.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 RecursiveDeleteCandidateNode extends AbstractRecursiveCandidateNode {
19 RecursiveDeleteCandidateNode(final NormalizedNodeContainer<?, PathArgument, NormalizedNode<?, ?>> data) {
25 public ModificationType getModificationType() {
26 return ModificationType.DELETE;
30 DataTreeCandidateNode createContainer(
31 final NormalizedNodeContainer<?, PathArgument, NormalizedNode<?, ?>> childData) {
32 return new RecursiveDeleteCandidateNode(childData);
37 public Optional<NormalizedNode<?, ?>> getDataAfter() {
38 return Optional.absent();
43 public Optional<NormalizedNode<?, ?>> getDataBefore() {
44 return dataOptional();
48 DataTreeCandidateNode createLeaf(final NormalizedNode<?, ?> childData) {
49 return new DeleteLeafCandidateNode(childData);