Move NormalizedNode builders
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / OrderedNodeContainer.java
index 5d37b7dffaf9ed3cca89dd1e1fa4391b61a65371..48b3fbf8c4f1a7d98c806dadcd18f4b28c1d7612 100644 (file)
@@ -7,30 +7,37 @@
  */
 package org.opendaylight.yangtools.yang.data.api.schema;
 
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
 
 /**
+ * A {@link NormalizedNodeContainer} which preserves user supplied ordering and allows addressing of child elements by
+ * position. All implementations of this interface must also implement {@link OrderingAware.User}.
  *
- * Normalized Node container which preserves user supplied ordering
- * and allows addressing of child elements by positiion.
- *
- * @param <V>
+ * @param <V> child type
  */
-public interface OrderedNodeContainer<V extends NormalizedNode<?, ?>> extends MixinNode, NormalizedNode<NodeIdentifier, Iterable<V>> {
+public interface OrderedNodeContainer<V extends NormalizedNode>
+        extends NormalizedNodeContainer<V>, MixinNode, OrderingAware.User {
+    @Override
+    NodeIdentifier getIdentifier();
 
     /**
-     * Returns child node by position
+     * Returns child node by position.
      *
      * @param position Position of child node
      * @return Child Node
-     * @throws IndexOutOfBoundsException
+     * @throws IndexOutOfBoundsException Out of bound Exception
      */
-    V getChild(int position);
+    // FIXME: 7.0.0: rename to 'childAt(int)'
+    @NonNull V getChild(int position);
 
-    /**
-     * Returns count of child nodes
-     *
-     * @return count of child nodes.
-     */
-    int getSize();
+    // FIXME: 7.0.0: do we really mean 'List' for body?
+    //    @Override
+    //    List<V> body();
+
+    @Override
+    int hashCode();
+
+    @Override
+    boolean equals(Object obj);
 }