Class IntegerValue
java.lang.Object
org.sblim.cimclient.internal.uri.Value
org.sblim.cimclient.internal.uri.IntegerValue
Class IntegerValue parses and encapsulates an integer value.
-
Method Summary
Modifier and TypeMethodDescriptionbigIntValueintbitLengthbytebyteValueintgetBitWidthgetTypeInfointintValue()intValuebooleanisNegativebooleanisSigned()isSignedlonglongValuestatic ValueParses an untyped integer value.static ValueparseSigned(URIString pUriStr, int pBitWidth) parseSignedstatic ValueparseUnsigned(URIString pUriStr, int pBitWidth) parseUnsignedshortshortValuetoString()
-
Method Details
-
parse
-
parseUnsigned
parseUnsigned- Parameters:
pUriStr-pBitWidth-- Returns:
- Value
- Throws:
IllegalArgumentException- if parsing failed.
-
parseSigned
parseSigned- Parameters:
pUriStr-pBitWidth-- Returns:
- Value
- Throws:
IllegalArgumentException- if parsing failed.
-
byteValue
public byte byteValue()byteValue- Returns:
- byte
-
shortValue
public short shortValue()shortValue- Returns:
- short
-
intValue
public int intValue()intValue- Returns:
- int
-
longValue
public long longValue()longValue- Returns:
- long
-
bigIntValue
-
isNegative
public boolean isNegative()isNegative- Returns:
trueif the number is negative
-
isSigned
public boolean isSigned()isSigned- Returns:
trueif the number is signed integer
-
bitLength
public int bitLength()bitLength- Returns:
- the number of bits which is required for storing this integer value.
-
getBitWidth
public int getBitWidth()getBitWidth- Returns:
- 8, 16, 32 or 64
-
toString
-
getTypeInfo
Description copied from class:ValuegetTypeInfo- Specified by:
getTypeInfoin classValue- Returns:
- the type description string of the Value.
- See Also:
-