/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
+ * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
package org.opendaylight.controller.model.util;\r
\r
import java.util.List;\r
import org.opendaylight.controller.model.api.type.RangeConstraint;\r
import org.opendaylight.controller.yang.common.QName;\r
\r
-public class Int32 extends AbstractInteger {\r
+/**\r
+ * Implementation of Yang int32 built-in type. <br>\r
+ * int32 represents integer values between -2147483648 and 2147483647,\r
+ * inclusively. The Java counterpart of Yang int32 built-in type is\r
+ * {@link Integer}.\r
+ * \r
+ * @see AbstractSignedInteger\r
+ * \r
+ */\r
+public class Int32 extends AbstractSignedInteger {\r
\r
private static final QName name = BaseTypes.constructQName("int32");\r
private Integer defaultValue = null;\r
- private static final String description = "";\r
- private static final String reference = "";\r
+ private static final String description = \r
+ "int32 represents integer values between -2147483648 and 2147483647, inclusively.";\r
\r
public Int32() {\r
- super(name, description, reference);\r
+ super(name, description, Integer.MIN_VALUE, Integer.MAX_VALUE, "");\r
}\r
\r
public Int32(final Integer defaultValue) {\r
- super(name, description, reference);\r
- this.defaultValue = defaultValue;\r
- }\r
-\r
- public Int32(final List<RangeConstraint> rangeStatements,\r
- final Integer defaultValue) {\r
- super(name, description, reference, rangeStatements);\r
- this.defaultValue = defaultValue;\r
- }\r
-\r
- public Int32(final String units, final Integer defaultValue) {\r
- super(name, description, reference, units);\r
+ super(name, description, Integer.MIN_VALUE, Integer.MAX_VALUE, "");\r
this.defaultValue = defaultValue;\r
}\r
\r
public Int32(final List<RangeConstraint> rangeStatements,\r
final String units, final Integer defaultValue) {\r
- super(name, description, reference, units, rangeStatements);\r
+ super(name, description, rangeStatements, units);\r
this.defaultValue = defaultValue;\r
}\r
\r
/*\r
* (non-Javadoc)\r
* \r
- * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()\r
+ * @see\r
+ * org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()\r
*/\r
@Override\r
public IntegerTypeDefinition getBaseType() {\r
/*\r
* (non-Javadoc)\r
* \r
- * @see org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue()\r
+ * @see\r
+ * org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue\r
+ * ()\r
*/\r
@Override\r
public Object getDefaultValue() {\r