public class LLRPBitList
extends java.lang.Object
Constructor and Description |
---|
LLRPBitList()
Creates a new LLRPBitList object.
|
LLRPBitList(byte[] bytes) |
LLRPBitList(byte[] bytes,
int maxlength)
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public LLRPBitList()
public LLRPBitList(byte[] bytes, int maxlength)
bytes
- interpreted in order they appear in arraypublic LLRPBitList(byte[] bytes)
public LLRPBitList(java.lang.String bitString)
bitString
- to be decodedpublic LLRPBitList(int n)
n
- length of bit listpublic 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 comparepublic boolean get(int position)
position
- of bitpublic 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 ispublic byte[] toByteArray()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2007 ETH Zurich.