Fix minor bug in FRM proactive flow code path
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-model-util / src / main / java / org / opendaylight / controller / yang / model / util / Int8.java
index a263fd19091acaa65ef8af574c4f6fe18a66d4e7..9f205955492a767ca10e43f4f4aa5979ff1f879f 100644 (file)
@@ -1,62 +1,51 @@
 /*
 * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.yang.model.util;
 
-import java.util.List;
-
 import org.opendaylight.controller.yang.common.QName;
+import org.opendaylight.controller.yang.model.api.SchemaPath;
 import org.opendaylight.controller.yang.model.api.type.IntegerTypeDefinition;
-import org.opendaylight.controller.yang.model.api.type.RangeConstraint;
 
 /**
- * Implementation of Yang int8 built-in type.
- * <br>
- * int8 represents integer values between -128 and 127, inclusively. The Java counterpart of 
- * Yang int8 built-in type is {@link Byte}.
- * 
+ * Implementation of Yang int8 built-in type. <br>
+ * int8 represents integer values between -128 and 127, inclusively. The Java
+ * counterpart of Yang int8 built-in type is {@link Byte}.
+ *
  * @see AbstractSignedInteger
  */
-public class Int8 extends AbstractSignedInteger {
-
+public final class Int8 extends AbstractSignedInteger {
     private static final QName name = BaseTypes.constructQName("int8");
-    private Byte defaultValue = null;
-    private static final String description = 
-            "represents integer values between -128 and 127, inclusively.";
-    
-    public Int8() {
-        super(name, description, Byte.MIN_VALUE, Byte.MAX_VALUE, "");
-    }
-
-    public Int8(final Byte defaultValue) {
-        super(name, description, Byte.MIN_VALUE, Byte.MAX_VALUE, "");
-        this.defaultValue = defaultValue;
-    }
+    private final Byte defaultValue = null;
+    private static final String description = "represents integer values between -128 and 127, inclusively.";
+    private final IntegerTypeDefinition baseType;
 
-    public Int8(final List<RangeConstraint> rangeStatements,
-            final String units, final Byte defaultValue) {
-        super(name, description, rangeStatements, units);
-        this.defaultValue = defaultValue;
+    public Int8(final SchemaPath path) {
+        super(path, name, description, Byte.MIN_VALUE, Byte.MAX_VALUE, "");
+        this.baseType = this;
     }
 
     /*
      * (non-Javadoc)
-     * 
-     * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()
+     *
+     * @see
+     * org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()
      */
     @Override
     public IntegerTypeDefinition getBaseType() {
-        return this;
+        return baseType;
     }
 
     /*
      * (non-Javadoc)
-     * 
-     * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue()
+     *
+     * @see
+     * org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue
+     * ()
      */
     @Override
     public Object getDefaultValue() {