|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.llrp.ltk.types.LLRPBitList
public class LLRPBitList
A list of bits used for binary representation of messages.
Constructor Summary | |
---|---|
LLRPBitList()
Creates a new LLRPBitList object. |
|
LLRPBitList(byte[] bytes)
bytes interpreted in order they appear in array. |
|
LLRPBitList(int n)
creates lit list with all bits set to 0. |
|
LLRPBitList(java.lang.String bitString)
create BitList from String. |
Method Summary | |
---|---|
void |
add(boolean bit)
add a bit to bit list. |
void |
append(LLRPBitList other)
appends other bit list to this. |
void |
clear(int position)
clear bit at specified position. |
void |
clear(java.lang.Integer i)
|
java.lang.Object |
clone()
clone. |
boolean |
equals(LLRPBitList other)
bitwise comparison. |
boolean |
get(int position)
get bit as boolean value at specified position. |
boolean |
get(java.lang.Integer i)
|
int |
hashCode()
|
int |
length()
returns number of bits in this list. |
void |
pad(int number)
add a list of 0s to front of list. |
void |
pad(java.lang.Integer i)
|
void |
set(int position)
set bit at specified position to true. |
void |
set(java.lang.Integer i)
|
LLRPBitList |
subList(java.lang.Integer from,
java.lang.Integer subLength)
return a list containing a copy of the elements starting at from, having length length. |
byte[] |
toByteArray()
8 bits bundled Integero one byte. |
java.lang.String |
toString()
encoded message as a string. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LLRPBitList()
public LLRPBitList(byte[] bytes)
bytes
- interpreted in order they appear in arraypublic LLRPBitList(java.lang.String bitString)
bitString
- to be decodedpublic LLRPBitList(int n)
n
- length of bit listMethod Detail |
---|
public void add(boolean bit)
bit
- to be addedpublic void append(LLRPBitList other)
other
- bit listpublic void clear(int position)
position
- to clearpublic void clear(java.lang.Integer i)
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(LLRPBitList other)
other
- to compare
public boolean get(int position)
position
- of bit
public boolean get(java.lang.Integer i)
public int length()
public void pad(int number)
number
- of bits to add at frontpublic void pad(java.lang.Integer i)
public void set(int position)
position
- start at index 0public void set(java.lang.Integer i)
public LLRPBitList subList(java.lang.Integer from, java.lang.Integer subLength)
from
- where sublist starts, list start at Index 0subLength
- long sublist is
public byte[] toByteArray()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |