org.llrp.ltk.types
Class UnsignedInteger96

java.lang.Object
  extended by org.llrp.ltk.types.LLRPType
      extended by org.llrp.ltk.types.LLRPNumberType
          extended by org.llrp.ltk.types.UnsignedInteger96
Direct Known Subclasses:
Integer96_HEX

public class UnsignedInteger96
extends LLRPNumberType

Unsigned 96bit Integer


Field Summary
protected static int LENGTH
           
protected  java.math.BigInteger value
           
 
Fields inherited from class org.llrp.ltk.types.LLRPNumberType
signed
 
Constructor Summary
UnsignedInteger96()
          Creates a new Integer96 object.
UnsignedInteger96(java.math.BigInteger value)
          Creates a new Integer96 object.
UnsignedInteger96(org.jdom.Element element)
          Creates a new Integer96 object.
UnsignedInteger96(LLRPBitList bitList)
          Creates a new Integer96 object.
UnsignedInteger96(long value)
           
UnsignedInteger96(java.lang.String string)
          Creates a new Integer96 object.
 
Method Summary
 void decodeBinary(LLRPBitList bitList)
          overwrite decodeBinary as it ha to work differently.
 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 value)
           
static int length()
          length in number of bits used to represent this type.
protected  void setBits(java.lang.Number value)
          set bits.
 java.lang.Integer toInteger()
          this Integer converted to java Integerer - miht cause loss of 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

LENGTH

protected static final int LENGTH
See Also:
Constant Field Values

value

protected java.math.BigInteger value
Constructor Detail

UnsignedInteger96

public UnsignedInteger96(java.math.BigInteger value)
Creates a new Integer96 object.

Parameters:
value - to set

UnsignedInteger96

public UnsignedInteger96(long value)

UnsignedInteger96

public UnsignedInteger96()
Creates a new Integer96 object.


UnsignedInteger96

public UnsignedInteger96(LLRPBitList bitList)
Creates a new Integer96 object.

Parameters:
bitList - to be decoded

UnsignedInteger96

public UnsignedInteger96(org.jdom.Element element)
Creates a new Integer96 object.

Parameters:
element - to be decoded

UnsignedInteger96

public UnsignedInteger96(java.lang.String string)
Creates a new Integer96 object.

Parameters:
string - in decimal representation
Method Detail

decodeBinary

public void decodeBinary(LLRPBitList bitList)
overwrite decodeBinary as it ha to work differently.

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

encodeBinary

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

Specified by:
encodeBinary in class LLRPType
Returns:
LLRPBitList

length

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

Returns:
Integer

toInteger

public java.lang.Integer toInteger()
this Integer converted to java Integerer - miht cause loss of precision.

Specified by:
toInteger in class LLRPNumberType
Returns:
Integer

setBits

protected void setBits(java.lang.Number value)
set bits.

Parameters:
value - to set

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

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(int radix)
Specified by:
toString in class LLRPType

toString

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

Overrides:
toString in class LLRPNumberType
Returns:
String

inRange

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

inRange

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


Copyright © 2007 ETH Zurich.