org.llrp.ltk.types
Class SignedInteger

java.lang.Object
  extended by org.llrp.ltk.types.LLRPType
      extended by org.llrp.ltk.types.LLRPNumberType
          extended by org.llrp.ltk.types.SignedInteger

public class SignedInteger
extends LLRPNumberType

Signed 32 bit Integer


Field Summary
protected  int value
           
 
Fields inherited from class org.llrp.ltk.types.LLRPNumberType
signed
 
Constructor Summary
SignedInteger()
          Creates a new SignedInteger object.
SignedInteger(org.jdom.Element element)
          Creates a new UnsignedInteger object from jdom element - used for xml decoding
SignedInteger(int value)
           
SignedInteger(java.lang.Integer value)
          Creates a new SignedInteger object.
SignedInteger(LLRPBitList bitList)
          Creates a new SignedInteger object.
SignedInteger(java.lang.String valueString)
          String representation in radix 10.
SignedInteger(java.lang.String valueString, int radix)
          String representation in specified radix.
 
Method Summary
 void decodeBinary(LLRPBitList list)
          decode to binary representation.
 void decodeXML(org.jdom.Element element)
          create objects from xml.
 LLRPBitList encodeBinary()
          encode this value
 org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
          create xml representation of this parameter.
 boolean inRange(long value)
           
 boolean inRange(java.lang.String valueString)
           
static int length()
          get number of bits used to represent this type.
 java.lang.Integer toInteger()
          Integer representation - no loss in precision
 java.lang.String toString()
          String representation
 java.lang.String toString(int radix)
           
 
Methods inherited from class org.llrp.ltk.types.LLRPNumberType
equals, hashCode, intValue
 
Methods inherited from class org.llrp.ltk.types.LLRPType
toXMLString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected int value
Constructor Detail

SignedInteger

public SignedInteger()
Creates a new SignedInteger object.


SignedInteger

public SignedInteger(java.lang.Integer value)
Creates a new SignedInteger object.

Parameters:
value - to set

SignedInteger

public SignedInteger(int value)

SignedInteger

public SignedInteger(LLRPBitList bitList)
Creates a new SignedInteger object.

Parameters:
bitList - to be decoded

SignedInteger

public SignedInteger(java.lang.String valueString)
String representation in radix 10.


SignedInteger

public SignedInteger(java.lang.String valueString,
                     int radix)
String representation in specified radix.


SignedInteger

public SignedInteger(org.jdom.Element element)
Creates a new UnsignedInteger object from jdom element - used for xml decoding

Parameters:
element - to be decoded
Method Detail

decodeBinary

public void decodeBinary(LLRPBitList list)
decode to binary representation.

Specified by:
decodeBinary in class LLRPType
Parameters:
list - to be decoded

length

public static int length()
get number of bits used to represent this type.

Returns:
Integer

toInteger

public java.lang.Integer toInteger()
Integer representation - no loss in precision

Specified by:
toInteger in class LLRPNumberType
Returns:
Integer

decodeXML

public void decodeXML(org.jdom.Element element)
Description copied from class: LLRPType
create objects from xml.

Specified by:
decodeXML in class LLRPType
Parameters:
element - to be decoded

encodeBinary

public LLRPBitList encodeBinary()
Description copied from class: LLRPType
encode this value

Specified by:
encodeBinary in class LLRPType
Returns:
LLRPBitList

encodeXML

public org.jdom.Content encodeXML(java.lang.String name,
                                  org.jdom.Namespace ns)
Description copied from class: LLRPType
create xml representation of this parameter.

Specified by:
encodeXML in class LLRPType
Parameters:
name - returned content should have
ns - Namespace of elements

toString

public java.lang.String toString()
Description copied from class: LLRPType
String representation

Overrides:
toString in class LLRPNumberType
Returns:
String

toString

public java.lang.String toString(int radix)
Specified by:
toString in class LLRPType

inRange

public boolean inRange(long value)
Specified by:
inRange in class LLRPNumberType

inRange

public boolean inRange(java.lang.String valueString)
Specified by:
inRange in class LLRPType


Copyright © 2007 ETH Zurich.