Remove yang.model.util.BaseTypes
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / type / BitsTypeDefinition.java
index 862129c9d6a25290fb43385379556dbad1536269..e8d98ae92e58f08531ecaee1238dcabc425d5637 100644 (file)
@@ -11,6 +11,9 @@ import java.util.Collection;
 import java.util.Objects;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.YangConstants;
 import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
 
@@ -18,16 +21,20 @@ import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
  * Makes is possible to access to the individual bits values of this type.
  */
 public interface BitsTypeDefinition extends TypeDefinition<BitsTypeDefinition> {
+    /**
+     * Well-known QName of the {@code bits} built-in type.
+     */
+    QName QNAME = QName.create(YangConstants.RFC6020_YANG_MODULE, "bits").intern();
+
     /**
      * Returns all bit values.
      *
-     * @return list of <code>Bit</code> type instastances with data about all
-     *         individual bits of <code>bits</code> YANG built-in type
+     * @return list of {@code Bit} type instances with data about all individual bits of {@code bits} YANG built-in type
      */
     @NonNull Collection<? extends Bit> getBits();
 
     static int hashCode(final @NonNull BitsTypeDefinition type) {
-        return Objects.hash(type.getPath(), type.getUnknownSchemaNodes(), type.getBaseType(),
+        return Objects.hash(type.getQName(), type.getUnknownSchemaNodes(), type.getBaseType(),
             type.getUnits().orElse(null), type.getDefaultValue().orElse(null), type.getBits());
     }
 
@@ -62,6 +69,6 @@ public interface BitsTypeDefinition extends TypeDefinition<BitsTypeDefinition> {
          *
          * @return The position value of bit in range from 0 to 4294967295.
          */
-        long getPosition();
+        @NonNull Uint32 getPosition();
     }
 }