Add NormalizedNode.contract()
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / ChoiceNode.java
index bba23440f04be438a65625de1d308a4939589998..17a893fa537e8e98c3072d16cef2cd89c5ac4553 100644 (file)
@@ -7,25 +7,30 @@
  */
 package org.opendaylight.yangtools.yang.data.api.schema;
 
-import java.util.Collection;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 
 /**
- *
  * Node representing data instance of <code>choice</code>.
  *
- * Choice node is instance of one of possible alternatives, from which
- * only one is allowed to exist at one time in particular context of parent node.
-   YANG Model and
- * schema for choice is described by instance of  {@link org.opendaylight.yangtools.yang.model.api.ChoiceNode}.
- * Valid alternatives of subtree are described by instances of {@link org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode}
- * which are retrieved via {@link org.opendaylight.yangtools.yang.model.api.ChoiceNode#getCases()}.
+ * <p>
+ * Choice node is instance of one of possible alternatives, from which only one is allowed to exist at one time in
+ * particular context of parent node.
+ *
+ * <p>
+ * YANG Model and schema for choice is described by instance of
+ * {@link org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode}.
  *
+ * <p>
+ * Valid alternatives of subtree are described by instances of
+ * {@link org.opendaylight.yangtools.yang.model.api.CaseSchemaNode}, which are retrieved via
+ * {@link org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode#getCases()}.
  */
-public interface ChoiceNode extends //
-        MixinNode, //
-        DataContainerNode<NodeIdentifier>,
-        DataContainerChild<NodeIdentifier, Collection<DataContainerChild<? extends PathArgument, ?>>> {
+public interface ChoiceNode extends MixinNode, DataContainerNode, DataContainerChild {
+    @Override
+    default Class<ChoiceNode> contract() {
+        return ChoiceNode.class;
+    }
 
+    @Override
+    NodeIdentifier getIdentifier();
 }