BUG-6316: Fix Bit and EnumPair's position/value types
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / type / EnumTypeDefinition.java
index 4ef71ef57f0248650f407327392f9d603b078696..770b5de84a5aff78a53d3622b3c1f09a97b5fa61 100644 (file)
@@ -8,19 +8,15 @@
 package org.opendaylight.yangtools.yang.model.api.type;
 
 import java.util.List;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.SchemaNode;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
+import javax.annotation.Nonnull;
+import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
 
 /**
- *
  * Makes is possible to access to the individual enumeration values of this
  * type.
- *
  */
 public interface EnumTypeDefinition extends TypeDefinition<EnumTypeDefinition> {
-
     /**
      * Returns all enumeration values.
      *
@@ -28,36 +24,14 @@ public interface EnumTypeDefinition extends TypeDefinition<EnumTypeDefinition> {
      *         data about all individual enumeration pairs of
      *         <code>enumeration</code> YANG built-in type
      */
-    List<EnumPair> getValues();
+    @Nonnull List<EnumPair> getValues();
 
     /**
      *
      * Contains the methods for accessing the data about the concrete
      * enumeration item which represents <code>enum</code> YANG type.
      */
-    interface EnumPair extends SchemaNode {
-
-        /**
-         *
-         * @deprecated Enum pair SHOULD NOT have schema path, since it's argument is only string and
-         *             not QName.
-         *
-         */
-        @Deprecated
-        @Override
-        SchemaPath getPath();
-
-        /**
-         *
-         * @deprecated Enum pair SHOULD NOT have QName, since it's argument is only string (allows
-         *             characters not allowed in QName) and not QName. Use {@link #getName()}
-         *             instead.
-         *
-         */
-        @Deprecated
-        @Override
-        QName getQName();
-
+    interface EnumPair extends DocumentedNode {
         /**
          * The name to specify each assigned name of an enumeration type.
          *
@@ -68,11 +42,10 @@ public interface EnumTypeDefinition extends TypeDefinition<EnumTypeDefinition> {
         /**
          * The "value" statement, which is optional, is used to associate an
          * integer value with the assigned name for the enum. This integer value
-         * MUST be in the range -2147483648 to 2147483647, and it MUST be unique
-         * within the enumeration type.
+         * MUST be unique within the enumeration type.
          *
          * @return integer value assigned to enumeration
          */
-        Integer getValue();
+        int getValue();
     }
 }