public class Bit extends LLRPNumberType
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
value |
signed| Constructor and Description |
|---|
Bit()
initially set to 0.
|
Bit(boolean x)
create a 7bit.
|
Bit(java.lang.Boolean bool)
everything but 0 is interpreted as 1.
|
Bit(org.jdom.Element element)
Creates a new Bit object from jdom element - used for xml decoding.
|
Bit(int x)
create a bit.
|
Bit(java.lang.Integer i) |
Bit(LLRPBitList bitList)
create a bit.
|
Bit(LLRPBitList bitList,
int bitIndex,
int length) |
Bit(java.lang.String x)
create a bit.
|
| Modifier and Type | Method and Description |
|---|---|
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()
length in number of bits used to represent this type.
|
boolean |
toBoolean()
0 is false, 1 is true.
|
byte |
toByte()
bit as byte - the last bit is set or not.
|
java.lang.Integer |
toInteger()
either 0 or 1.
|
java.lang.String |
toString()
String representation
|
java.lang.String |
toString(int radix) |
equals, hashCodetoXMLStringpublic Bit(LLRPBitList bitList, int bitIndex, int length)
public Bit()
public Bit(int x)
x - -
everything but 0 is interpreted as 1public Bit(boolean x)
x - public Bit(java.lang.Integer i)
public Bit(java.lang.String x)
x - -
everything but 0 is interpreted as 1public Bit(LLRPBitList bitList)
bitList - -
everything but 0 is interpreted as 1public Bit(java.lang.Boolean bool)
bool - initial valuepublic Bit(org.jdom.Element element)
element - to be decodedpublic static int length()
public boolean toBoolean()
public byte toByte()
public java.lang.Integer toInteger()
toInteger in class LLRPNumberTypepublic int intValue()
intValue in class LLRPNumberTypepublic void decodeXML(org.jdom.Element element)
LLRPTypepublic org.jdom.Content encodeXML(java.lang.String name,
org.jdom.Namespace ns)
LLRPTypepublic void decodeBinary(LLRPBitList list)
LLRPTypedecodeBinary in class LLRPTypelist - to be decodedpublic LLRPBitList encodeBinary()
LLRPTypeencodeBinary in class LLRPTypepublic java.lang.String toString()
LLRPTypetoString in class LLRPNumberTypepublic boolean inRange(long value)
inRange in class LLRPNumberTypeCopyright © 2007 ETH Zurich.