org.llrp.ltk.types
Class SignedByte

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

public class SignedByte
extends LLRPNumberType

8 Bit Integer


Field Summary
protected  java.lang.Integer value
           
 
Fields inherited from class org.llrp.ltk.types.LLRPNumberType
signed
 
Constructor Summary
SignedByte()
          Creates a new SignedByte object.
SignedByte(byte value)
          Creates a new SignedByte object.
SignedByte(org.jdom.Element element)
          Creates a new SignedByte object.
SignedByte(int value)
           
SignedByte(java.lang.Integer value)
          Creates a new SignedByte object from Integer.
SignedByte(LLRPBitList bitList)
          Creates a new SignedByte object.
SignedByte(java.lang.String stringValue)
          Creates a new SignedByte object.
SignedByte(java.lang.String valueString, int radix)
          String representation in specified radix.
 
Method Summary
 void decodeBinary(LLRPBitList list)
          decode
 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)
           
 int intValue()
           
static int length()
          number of bits used to represent this type.
 byte toByte()
          this represented as byte - no loss of precision.
 java.lang.Integer toInteger()
          this represented as Integereger - no 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
 
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 java.lang.Integer value
Constructor Detail

SignedByte

public SignedByte(byte value)
Creates a new SignedByte object.

Parameters:
value - to set

SignedByte

public SignedByte(java.lang.String stringValue)
Creates a new SignedByte object.

Parameters:
stringValue - value as string

SignedByte

public SignedByte(java.lang.Integer value)
Creates a new SignedByte object from Integer. One might loose precision.

Parameters:
value - to set

SignedByte

public SignedByte(int value)

SignedByte

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


SignedByte

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

Parameters:
bitList - to be decoded

SignedByte

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

Parameters:
element - to be decoded

SignedByte

public SignedByte()
Creates a new SignedByte object.

Method Detail

length

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

Returns:
Integer

toByte

public byte toByte()
this represented as byte - no loss of precision.

Returns:
Byte

toInteger

public java.lang.Integer toInteger()
this represented as Integereger - no loss of precision.

Specified by:
toInteger in class LLRPNumberType
Returns:
Integer

intValue

public int intValue()
Overrides:
intValue in class LLRPNumberType

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

decodeBinary

public void decodeBinary(LLRPBitList list)
Description copied from class: LLRPType
decode

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

encodeBinary

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

Specified by:
encodeBinary in class LLRPType
Returns:
LLRPBitList

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.