\Zxing\CommonBitArray

<p>A simple, fast array of bits, represented compactly by an array of ints internally.</p>

Summary

Methods
Properties
Constants
__construct()
getSize()
getSizeInBytes()
get()
set()
flip()
getNextSet()
getNextUnset()
setBulk()
setRange()
clear()
isRange()
appendBit()
appendBits()
appendBitArray()
_xor()
toBytes()
getBitArray()
reverse()
equals()
hashCode()
toString()
_clone()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
ensureCapacity()
makeArray()
$bits
$size
N/A

Properties

$bits

$bits : 

Type

$size

$size : 

Type

Methods

__construct()

__construct(  $bits = array(),   $size) 

Parameters

$bits
$size

getSize()

getSize() 

getSizeInBytes()

getSizeInBytes() 

get()

get(  $i) : true

Parameters

$i

Returns

true —

iff bit i is set

set()

set(  $i) 

Sets bit i.

Parameters

$i

flip()

flip(  $i) 

Flips bit i.

Parameters

$i

getNextSet()

getNextSet(  $from) : \Zxing\Common\index

Parameters

$from

Returns

\Zxing\Common\index —

of first bit that is set, starting from the given index, or size if none are set at or beyond this given index

getNextUnset()

getNextUnset(  $from) : \Zxing\Common\index

Parameters

$from

Returns

\Zxing\Common\index —

of next unset bit, or {@code size} if none are unset until the end

setBulk()

setBulk(  $i,   $newBits) 

Sets a block of 32 bits, starting at bit i.

Parameters

$i
$newBits

setRange()

setRange(  $start,   $end) 

Sets a range of bits.

Parameters

$start
$end

clear()

clear() 

Clears all bits (sets to false).

isRange()

isRange(  $start,   $end,   $value) : true

Efficient method to check if a range of bits is set, or not set.

Parameters

$start
$end
$value

Throws

\Zxing\Common\InvalidArgumentException

if end is less than or equal to start

Returns

true —

iff all bits are set or not set in range, according to value argument

appendBit()

appendBit(  $bit) 

Parameters

$bit

appendBits()

appendBits(  $value,   $numBits) 

Appends the least-significant bits, from value, in order from most-significant to least-significant. For example, appending 6 bits from 0x000001E will append the bits 0, 1, 1, 1, 1, 0 in that order.

Parameters

$value
$numBits

appendBitArray()

appendBitArray(  $other) 

Parameters

$other

_xor()

_xor(  $other) 

Parameters

$other

toBytes()

toBytes(  $bitOffset,   $array,   $offset,   $numBytes) 

Parameters

$bitOffset
$array
$offset
$numBytes

getBitArray()

getBitArray() : \Zxing\Common\underlying

Returns

\Zxing\Common\underlying —

array of ints. The first element holds the first 32 bits, and the least significant bit is bit 0.

reverse()

reverse() 

Reverses all bits in the array.

equals()

equals(  $o) 

Parameters

$o

hashCode()

hashCode() 

toString()

toString() 

_clone()

_clone() 

ensureCapacity()

ensureCapacity(  $size) 

Parameters

$size

makeArray()

makeArray(  $size) 

Parameters

$size