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 org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
16 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
18 final class EmptyDataTreeCandidateNode implements DataTreeCandidateNode {
19 private final PathArgument identifier;
21 EmptyDataTreeCandidateNode(final PathArgument identifier) {
22 this.identifier = requireNonNull(identifier, "Identifier should not be null");
26 public PathArgument getIdentifier() {
31 public Collection<DataTreeCandidateNode> getChildNodes() {
32 return ImmutableList.of();
36 public Optional<DataTreeCandidateNode> getModifiedChild(final PathArgument childIdentifier) {
37 return Optional.empty();
41 public ModificationType getModificationType() {
42 return ModificationType.UNMODIFIED;
46 public Optional<NormalizedNode> getDataAfter() {
47 return Optional.empty();
51 public Optional<NormalizedNode> getDataBefore() {
52 return Optional.empty();