Use Objects.equals() in yang-model-util
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / BooleanType.java
index b4740884fb24743a4c3b3b5f6522da9d81a580de..20ec00cce25147bc2a8627902e97966734ae6077 100644 (file)
@@ -23,8 +23,7 @@ import org.opendaylight.yangtools.yang.model.api.type.BooleanTypeDefinition;
  */
 public final class BooleanType implements BooleanTypeDefinition {
     private static final BooleanType INSTANCE = new BooleanType();
-    private static final QName NAME = BaseTypes.constructQName("boolean");
-    private static final SchemaPath PATH = new SchemaPath(Collections.singletonList(NAME), true);
+    private static final SchemaPath PATH = SchemaPath.create(true, BaseTypes.BOOLEAN_QNAME);
     private static final String DESCRIPTION = "The boolean built-in type represents a boolean value.";
     private static final String REFERENCE = "https://tools.ietf.org/html/rfc6020#section-9.5";
     private static final String UNITS = "";
@@ -35,6 +34,10 @@ public final class BooleanType implements BooleanTypeDefinition {
     private BooleanType() {
     }
 
+    /**
+     * Returns default instance of boolean built-in type.
+     * @return default instance of boolean built-in type.
+     */
     public static BooleanType getInstance() {
         return INSTANCE;
     }
@@ -79,7 +82,7 @@ public final class BooleanType implements BooleanTypeDefinition {
      */
     @Override
     public QName getQName() {
-        return NAME;
+        return BaseTypes.BOOLEAN_QNAME;
     }
 
     /*
@@ -132,7 +135,7 @@ public final class BooleanType implements BooleanTypeDefinition {
     public String toString() {
         StringBuilder builder = new StringBuilder();
         builder.append("BooleanType [name=");
-        builder.append(NAME);
+        builder.append(BaseTypes.BOOLEAN_QNAME);
         builder.append(", path=");
         builder.append(PATH);
         builder.append("]");