org.sblim.cimclient.internal.uri
Class IntegerValue

java.lang.Object
  extended by org.sblim.cimclient.internal.uri.Value
      extended by org.sblim.cimclient.internal.uri.IntegerValue

public class IntegerValue
extends Value

Class IntegerValue parses and encapsulates an integer value.


Method Summary
 java.math.BigInteger bigIntValue()
          bigIntValue
 int bitLength()
          bitLength
 byte byteValue()
          byteValue
 int getBitWidth()
          getBitWidth
 java.lang.String getTypeInfo()
          getTypeInfo
 int intValue()
          intValue
 boolean isNegative()
          isNegative
 boolean isSigned()
          isSigned
 long longValue()
          longValue
static Value parse(URIString pUriStr)
          Parses an untyped integer value.
static Value parseSigned(URIString pUriStr, int pBitWidth)
          parseSigned
static Value parseUnsigned(URIString pUriStr, int pBitWidth)
          parseUnsigned
 short shortValue()
          shortValue
 java.lang.String toString()
           
 
Methods inherited from class org.sblim.cimclient.internal.uri.Value
parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

parse

public static Value parse(URIString pUriStr)
Parses an untyped integer value.

Parameters:
pUriStr -
Returns:
a Value

parseUnsigned

public static Value parseUnsigned(URIString pUriStr,
                                  int pBitWidth)
                           throws java.lang.IllegalArgumentException
parseUnsigned

Parameters:
pUriStr -
pBitWidth -
Returns:
Value
Throws:
java.lang.IllegalArgumentException - if parsing failed.

parseSigned

public static Value parseSigned(URIString pUriStr,
                                int pBitWidth)
                         throws java.lang.IllegalArgumentException
parseSigned

Parameters:
pUriStr -
pBitWidth -
Returns:
Value
Throws:
java.lang.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

public java.math.BigInteger bigIntValue()
bigIntValue

Returns:
BigInteger

isNegative

public boolean isNegative()
isNegative

Returns:
true if the number is negative

isSigned

public boolean isSigned()
isSigned

Returns:
true if 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

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getTypeInfo

public java.lang.String getTypeInfo()
Description copied from class: Value
getTypeInfo

Specified by:
getTypeInfo in class Value
Returns:
the type description string of the Value.
See Also:
Value.getTypeInfo()


Copyright © 2005, 2011 IBM Corporation. All Rights Reserved.