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 java.util.Collection;
12 import java.util.Collections;
13 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
14 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
15 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode;
17 abstract class AbstractLeafCandidateNode implements DataTreeCandidateNode {
18 private final NormalizedNode<?, ?> data;
20 protected AbstractLeafCandidateNode(final NormalizedNode<?, ?> data) {
24 protected final Optional<NormalizedNode<?, ?>> dataOptional() {
25 return Optional.<NormalizedNode<?, ?>>of(data);
29 public final Collection<DataTreeCandidateNode> getChildNodes() {
30 return Collections.emptyList();
34 public final PathArgument getIdentifier() {
35 return data.getIdentifier();
39 public final DataTreeCandidateNode getModifiedChild(final PathArgument identifier) {