public class BitArray extends LLRPType
Modifier and Type | Field and Description |
---|---|
protected Bit[] |
bits |
protected static int |
LENGTH |
Constructor and Description |
---|
BitArray()
Creates an empty BitArray.
|
BitArray(Bit[] bits)
create a new BitArray.
|
BitArray(org.jdom.Element element) |
BitArray(int length)
create a new BitArray.
|
BitArray(LLRPBitList list)
create a new BitArray.
|
BitArray(java.lang.String binaryString) |
Modifier and Type | Method and Description |
---|---|
void |
add(Bit aBit) |
void |
clear(int i)
set bit at provided positionto 0.
|
void |
decodeBinary(LLRPBitList list)
Create BitArray from BitList.
|
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.
|
Bit |
get(int i)
get bit at specified position.
|
boolean |
inRange(java.lang.String valueString)
expects a string as formated for XML
|
static int |
length()
length of BaseType - not the array - for array length call size().
|
void |
set(int i)
set bit at provided position to 1.
|
int |
size()
number of elements in array.
|
java.lang.String |
toString()
String representation
|
java.lang.String |
toString(int radix) |
toXMLString
protected static final int LENGTH
protected Bit[] bits
public BitArray(Bit[] bits)
bits
- to be decodedpublic BitArray(LLRPBitList list)
list
- to be decodedpublic BitArray(int length)
length
- of arraypublic BitArray()
public BitArray(org.jdom.Element element)
element
- to be decodedpublic BitArray(java.lang.String binaryString)
binaryString
- public void clear(int i)
i
- to be clearedpublic LLRPBitList encodeBinary()
encodeBinary
in class LLRPType
public static int length()
public void decodeBinary(LLRPBitList list)
decodeBinary
in class LLRPType
list
- to be decodedpublic Bit get(int i)
i
- to getpublic void set(int i)
i
- to be set to 1public int size()
public org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
LLRPType
public void decodeXML(org.jdom.Element element)
LLRPType
public void add(Bit aBit)
public java.lang.String toString()
LLRPType
Copyright © 2007 ETH Zurich.