org.llrp.ltk.types
Class SignedIntegerArray

java.lang.Object
  extended by org.llrp.ltk.types.LLRPType
      extended by org.llrp.ltk.types.SignedIntegerArray

public class SignedIntegerArray
extends LLRPType

Array of 32 bit integers - length encoded as first 16 bits in binary encoding


Constructor Summary
SignedIntegerArray()
          Creates an empty SignedIntegerArray.
SignedIntegerArray(org.jdom.Element element)
          Creates a new SignedIntegerArray object from jdom element - used for xml decoding
SignedIntegerArray(int length)
          Creates a new SignedIntegerArray object.
SignedIntegerArray(int[] data)
           
SignedIntegerArray(LLRPBitList bits)
          first 16 bits of LLRPBitlist must indicate number of entries that follow
SignedIntegerArray(SignedInteger[] ints)
          Creates a new SignedIntegerArray object.
SignedIntegerArray(java.lang.String string)
           
 
Method Summary
 void add(SignedInteger aInteger)
           
 void decodeBinary(LLRPBitList list)
          first 16 bits of LLRPBitlist must indicate number of entries that follow
 void decodeXML(org.jdom.Element element)
          create objects from xml.
 LLRPBitList encodeBinary()
          encodes length before encoding containing values
 org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
          create xml representation of this parameter.
 boolean equals(LLRPType other)
          compare each element
 SignedInteger get(int i)
          get SignedInteger at specified position
 int getByteLength()
          number of bytes used to represent this type
 boolean inRange(java.lang.String valueString)
          expects a string as formated for XML
static int length()
          length of BaseType not array - for array length call size()
 void set(int i, SignedInteger b)
          set SignedInteger at i to b
 int size()
          number of elements in array
 java.lang.String toString()
          String representation
 java.lang.String toString(int radix)
           
 
Methods inherited from class org.llrp.ltk.types.LLRPType
toXMLString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SignedIntegerArray

public SignedIntegerArray(SignedInteger[] ints)
Creates a new SignedIntegerArray object.

Parameters:
ints - to create UsnignedIntegerArray from

SignedIntegerArray

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

Parameters:
element - to be decoded

SignedIntegerArray

public SignedIntegerArray(int length)
Creates a new SignedIntegerArray object.

Parameters:
length - of array

SignedIntegerArray

public SignedIntegerArray(int[] data)

SignedIntegerArray

public SignedIntegerArray(LLRPBitList bits)
first 16 bits of LLRPBitlist must indicate number of entries that follow

Parameters:
bits - to be decoded

SignedIntegerArray

public SignedIntegerArray(java.lang.String string)
Parameters:
string -

SignedIntegerArray

public SignedIntegerArray()
Creates an empty SignedIntegerArray. Do not call methood 'set' on an empty array. Add SignedInteger by calling the add method

Method Detail

encodeBinary

public LLRPBitList encodeBinary()
encodes length before encoding containing values

Specified by:
encodeBinary in class LLRPType
Returns:
LLRPBitList

getByteLength

public int getByteLength()
number of bytes used to represent this type

Returns:
Integer

length

public static int length()
length of BaseType not array - for array length call size()

Returns:
int

decodeBinary

public void decodeBinary(LLRPBitList list)
first 16 bits of LLRPBitlist must indicate number of entries that follow

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

get

public SignedInteger get(int i)
get SignedInteger at specified position

Parameters:
i - position
Returns:
SignedInteger

set

public void set(int i,
                SignedInteger b)
set SignedInteger at i to b

Parameters:
i - position
b - SignedInteger to be set

size

public int size()
number of elements in array

Returns:
int

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

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

add

public void add(SignedInteger aInteger)

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 LLRPType
Returns:
String

inRange

public boolean inRange(java.lang.String valueString)
expects a string as formated for XML

Specified by:
inRange in class LLRPType

equals

public boolean equals(LLRPType other)
compare each element

Parameters:
other - to compare
Returns:
boolean


Copyright © 2007 ETH Zurich.