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 int16 built-in type. <br>
* int16 represents integer values between -32768 and 32767, inclusively. The
* Java counterpart of Yang int16 built-in type is {@link Short}.
- *
+ *
* @see AbstractSignedInteger
*/
-public class Int16 extends AbstractSignedInteger {
+public final class Int16 extends AbstractSignedInteger {
private static final QName name = BaseTypes.constructQName("int16");
private Short defaultValue = null;
- private static final String description =
- "int16 represents integer values between -32768 and 32767, inclusively.";
+ private static final String description = "int16 represents integer values between -32768 and 32767, inclusively.";
+ private final IntegerTypeDefinition baseType;
- public Int16() {
+ private Int16() {
super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, "");
+ this.baseType = this;
+ }
+
+ public Int16(final SchemaPath path) {
+ super(path, name, description, Short.MIN_VALUE, Short.MAX_VALUE, "");
+ this.baseType = new Int16();
+
}
- public Int16(final List<RangeConstraint> rangeStatements,
- final String units, final Short defaultValue) {
- super(name, description, rangeStatements, units);
+ public Int16(final SchemaPath path,
+ final List<RangeConstraint> rangeStatements, final String units,
+ final Short defaultValue) {
+ super(path, name, description, rangeStatements, units);
this.defaultValue = defaultValue;
+ this.baseType = new Int16();
}
@Override
public IntegerTypeDefinition getBaseType() {
- return this;
+ return baseType;
}
@Override