2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
5 * and is available at http://www.eclipse.org/legal/epl-v10.html
7 package org.opendaylight.yangtools.yang.data.api.schema;
9 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
11 import com.google.common.base.Optional;
14 * Node which is not leaf, but has child {@link NormalizedNode}s as its valzue.
17 * NormalizedNodeContainer does not have a value, but it has a child
18 * nodes. Definition of possible and valid child nodes is introduced
19 * in subclasses of this interface.
21 * This interface should not be used directly, but rather use of of derived subinterfaces
22 * such as {@link DataContainerNode}, {@link MapNode}, {@link LeafSetNode}.
25 * Node Identifier type
27 * Child Node Identifier type
31 public interface NormalizedNodeContainer<I extends PathArgument, K extends PathArgument, V extends NormalizedNode<? extends K, ?>>
32 extends NormalizedNode<I, Iterable<V>> {
38 * Returns immutable iteration of child nodes of this node.
42 Iterable<V> getValue();
45 * Returns child node identified by provided key.
48 * Path argument identifying child node
49 * @return Optional with child node if child exists.
50 * {@link Optional#absent()} if child does not exists.
52 Optional<V> getChild(K child);