2 * Copyright (c) 2017 Pantheon Technologies, s.r.o. 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.api.schema.tree;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.collect.ImmutableList;
13 import java.util.Collection;
14 import java.util.Optional;
15 import javax.annotation.Nonnull;
16 import javax.annotation.Nullable;
17 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
18 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
20 final class EmptyDataTreeCandidateNode implements DataTreeCandidateNode {
22 private final PathArgument identifier;
24 EmptyDataTreeCandidateNode(final PathArgument identifier) {
25 this.identifier = requireNonNull(identifier, "Identifier should not be null");
30 public PathArgument getIdentifier() {
36 public Collection<DataTreeCandidateNode> getChildNodes() {
37 return ImmutableList.of();
42 public DataTreeCandidateNode getModifiedChild(final PathArgument childIdentifier) {
48 public ModificationType getModificationType() {
49 return ModificationType.UNMODIFIED;
54 public Optional<NormalizedNode<?, ?>> getDataAfter() {
55 return Optional.empty();
60 public Optional<NormalizedNode<?, ?>> getDataBefore() {
61 return Optional.empty();