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 com.google.common.base.Optional;
11 import java.util.Collection;
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.
22 * This interface should not be used directly, but rather use of of derived subinterfaces
23 * such as {@link DataContainerNode}, {@link MapNode}, {@link LeafSetNode}.
26 * Node Identifier type
28 * Child Node Identifier type
32 public interface NormalizedNodeContainer<I extends PathArgument, K extends PathArgument, V extends NormalizedNode<? extends K, ?>>
33 extends NormalizedNode<I, Collection<V>> {
39 * Returns immutable iteration of child nodes of this node.
43 Collection<V> getValue();
46 * Returns child node identified by provided key.
49 * Path argument identifying child node
50 * @return Optional with child node if child exists.
51 * {@link Optional#absent()} if child does not exists.
53 Optional<V> getChild(K child);