|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.llrp.ltk.types.LLRPType org.llrp.ltk.types.LLRPNumberType org.llrp.ltk.types.Bit
public class Bit
A single bit
Field Summary | |
---|---|
protected java.lang.Integer |
value
|
Fields inherited from class org.llrp.ltk.types.LLRPNumberType |
---|
signed |
Constructor Summary | |
---|---|
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(java.lang.String x)
create a bit. |
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()
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)
|
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 |
---|
protected java.lang.Integer value
Constructor Detail |
---|
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 decodedMethod Detail |
---|
public static int length()
public boolean toBoolean()
public byte toByte()
public java.lang.Integer toInteger()
toInteger
in class LLRPNumberType
public int intValue()
intValue
in class LLRPNumberType
public void decodeXML(org.jdom.Element element)
LLRPType
decodeXML
in class LLRPType
element
- to be decodedpublic org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
LLRPType
encodeXML
in class LLRPType
name
- returned content should havens
- Namespace of elementspublic void decodeBinary(LLRPBitList list)
LLRPType
decodeBinary
in class LLRPType
list
- to be decodedpublic LLRPBitList encodeBinary()
LLRPType
encodeBinary
in class LLRPType
public java.lang.String toString()
LLRPType
toString
in class LLRPNumberType
public java.lang.String toString(int radix)
toString
in class LLRPType
public boolean inRange(long value)
inRange
in class LLRPNumberType
public boolean inRange(java.lang.String valueString)
inRange
in class LLRPType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |