Fixup more javadocs
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / BooleanType.java
index 7ecba89748daf84d4fbf6208d62319e1eb27f22d..20ec00cce25147bc2a8627902e97966734ae6077 100644 (file)
@@ -23,11 +23,10 @@ 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 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 final String units = "";
+    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 = "";
 
     /**
      * Default constructor with default value set to "false".
@@ -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;
     }
@@ -47,7 +50,7 @@ public final class BooleanType implements BooleanTypeDefinition {
      */
     @Override
     public BooleanTypeDefinition getBaseType() {
-        return this;
+        return null;
     }
 
     /*
@@ -57,7 +60,7 @@ public final class BooleanType implements BooleanTypeDefinition {
      */
     @Override
     public String getUnits() {
-        return units;
+        return UNITS;
     }
 
     /*
@@ -79,7 +82,7 @@ public final class BooleanType implements BooleanTypeDefinition {
      */
     @Override
     public QName getQName() {
-        return name;
+        return BaseTypes.BOOLEAN_QNAME;
     }
 
     /*
@@ -89,7 +92,7 @@ public final class BooleanType implements BooleanTypeDefinition {
      */
     @Override
     public SchemaPath getPath() {
-        return path;
+        return PATH;
     }
 
     /*
@@ -100,7 +103,7 @@ public final class BooleanType implements BooleanTypeDefinition {
      */
     @Override
     public String getDescription() {
-        return description;
+        return DESCRIPTION;
     }
 
     /*
@@ -110,7 +113,7 @@ public final class BooleanType implements BooleanTypeDefinition {
      */
     @Override
     public String getReference() {
-        return reference;
+        return REFERENCE;
     }
 
     /*
@@ -132,9 +135,9 @@ 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(PATH);
         builder.append("]");
         return builder.toString();
     }