2 * Copyright (c) 2014 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.api.schema;
10 import java.util.Collection;
11 import java.util.Optional;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
15 * Node which is not leaf, but has child {@link NormalizedNode}s as its valzue.
18 * NormalizedNodeContainer does not have a value, but it has a child
19 * nodes. Definition of possible and valid child nodes is introduced
20 * in subclasses of this interface.
23 * This interface should not be used directly, but rather use of of derived subinterfaces
24 * such as {@link DataContainerNode}, {@link MapNode}, {@link LeafSetNode}.
27 * Node Identifier type
29 * Child Node Identifier type
33 public interface NormalizedNodeContainer<I extends PathArgument, K extends PathArgument,
34 V extends NormalizedNode<? extends K, ?>> extends NormalizedNode<I, Collection<V>> {
40 * Returns immutable iteration of child nodes of this node.
44 Collection<V> getValue();
47 * Returns child node identified by provided key.
50 * Path argument identifying child node
51 * @return Optional with child node if child exists.
52 * {@link Optional#empty()} if child does not exists.
54 Optional<V> getChild(K child);