Bug 5019: Add QName param to NormalizedNodeWriter#leafSetEntryNode
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / DataContainerNode.java
index ce73d1c93e49052863bb10784cf1501007b07686..270f46331e7a6ae0f6fa3a64979363c9ccb91d8f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -7,20 +7,42 @@
  */
 package org.opendaylight.yangtools.yang.data.api.schema;
 
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
-
-import com.google.common.base.Optional;
+import java.util.Collection;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 
+/**
+ *
+ * Abstract node which does not have value but contains valid {@link DataContainerChild} nodes.
+ *
+ * Schema of this node is described by instance of {@link org.opendaylight.yangtools.yang.model.api.DataNodeContainer}.
+ *
+ * <h2>Implementation notes</h2>
+ * This interface should not be implemented directly, but rather implementing one of it's subclasses
+ * <ul>
+ * <li>{@link ContainerNode}
+ * <li>{@link MapEntryNode}
+ * <li>{@link UnkeyedListEntryNode}
+ * <li>{@link ChoiceNode}
+ * <li>{@link AugmentationNode}
+ * </ul>
+ *
+ * @param <K> {@link PathArgument} which identifies instance of {@link DataContainerNode}
+ */
 public interface DataContainerNode<K extends PathArgument> extends //
         NormalizedNodeContainer<K, PathArgument, DataContainerChild<? extends PathArgument, ?>> {
 
+    /**
+     * Returns iteration of all child nodes
+     *
+     * Order of returned child nodes may be defined by subinterfaces.
+     *
+     * <b>Implementation Notes:</b>
+     * <p>
+     * All nodes returned in this iterable, MUST also be accessible via
+     * {@link #getChild(PathArgument)} using their associated identifier.
+     *
+     * @return Iteration of all child nodes
+     */
     @Override
-    public K getIdentifier();
-
-    @Override
-    public Iterable<DataContainerChild<? extends PathArgument, ?>> getValue();
-
-    @Override
-    public Optional<DataContainerChild<? extends PathArgument, ?>> getChild(PathArgument child);
-
+    Collection<DataContainerChild<? extends PathArgument, ?>> getValue();
 }