Package com.oss.metadata
Class IntegerInfo
java.lang.Object
com.oss.metadata.TypeInfo
com.oss.metadata.IntegerInfo
- Direct Known Subclasses:
HugeIntegerInfo
The IntegerInfo class represents the properties of an ASN.1 INTEGER type.
- Since:
- ASN.1/Java 2.1
-
Method Summary
Modifier and TypeMethodDescriptionReturns the lower and upper bounds of values of the type, and null if none exist.Returns a reference to the list of named numbers, and null if the integer was not defined with a named number list.int
getSize()
Returns a byte-size of an integer variable that is suitable to hold all the values of constrained INTEGER type.boolean
Returns true if the type is defined with a named number list, and false otherwise.boolean
Returns true if type is bounded, and false if there is no lower or upper bound.Methods inherited from class com.oss.metadata.TypeInfo
createInstance, createInstance, forName, forName, getASN1ModuleName, getASN1TypeName, getClassName, getConstraints, getJavaClass, getJavaClass, getName, getTags, isExtensible, isNullable, isPrimitive, isSimpleType, isSorted, isUseableByBER, isUseableByCER, isUseableByDER, isUseableByEXER, isUseableByJSON, isUseableByOER, isUseableByPER, isUseableByXER, isUserClass, isUseThreadContextClassLoader, setUseThreadContextClassLoader
-
Method Details
-
isBounded
public boolean isBounded()Returns true if type is bounded, and false if there is no lower or upper bound.- Returns:
- true if type is bounded.
-
getBounds
Returns the lower and upper bounds of values of the type, and null if none exist.- Returns:
- lower and upper bounds of values of the type.
-
hasMemberList
public boolean hasMemberList()Returns true if the type is defined with a named number list, and false otherwise.- Returns:
- true if the type is defined with a named number list.
-
getMemberList
Returns a reference to the list of named numbers, and null if the integer was not defined with a named number list.- Returns:
- a reference to the list of named numbers.
-
getSize
public int getSize()Returns a byte-size of an integer variable that is suitable to hold all the values of constrained INTEGER type. Possible sizes are 1, 2, 4 and 8. 0 is returned is type has no constraints or requires more than 8 bytes to store it's values.- Returns:
- integer variable byte size.
-