C# Class zxingwp7.common.BitArray

A simple, fast array of bits, represented compactly by an array of ints internally.

Show file Open project: henningms/zxing2.0-wp7 Class Usage Examples

Public Properties

Property Type Description
bits int[]
size int

Public Methods

Method Description
BitArray ( int size ) : System
ToString ( ) : String
clear ( ) : void

Clears all bits (sets to false).

flip ( int i ) : void

Flips bit i.

getBitArray ( ) : int[]
get_Renamed ( int i ) : bool
isRange ( int start, int end, bool value_Renamed ) : bool

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

reverse ( ) : void

Reverses all bits in the array.

setBulk ( int i, int newBits ) : void

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

set_Renamed ( int i ) : void

Sets bit i.

Private Methods

Method Description
makeArray ( int size ) : int[]

Method Details

BitArray() public method

public BitArray ( int size ) : System
size int
return System

ToString() public method

public ToString ( ) : String
return String

clear() public method

Clears all bits (sets to false).
public clear ( ) : void
return void

flip() public method

Flips bit i.
public flip ( int i ) : void
i int bit to set ///
return void

getBitArray() public method

public getBitArray ( ) : int[]
return int[]

get_Renamed() public method

public get_Renamed ( int i ) : bool
i int bit to get ///
return bool

isRange() public method

Efficient method to check if a range of bits is set, or not set.
public isRange ( int start, int end, bool value_Renamed ) : bool
start int start of range, inclusive. ///
end int end of range, exclusive ///
value_Renamed bool
return bool

reverse() public method

Reverses all bits in the array.
public reverse ( ) : void
return void

setBulk() public method

Sets a block of 32 bits, starting at bit i.
public setBulk ( int i, int newBits ) : void
i int first bit to set ///
newBits int the new value of the next 32 bits. Note again that the least-significant bit /// corresponds to bit i, the next-least-significant to i+1, and so on. ///
return void

set_Renamed() public method

Sets bit i.
public set_Renamed ( int i ) : void
i int bit to set ///
return void

Property Details

bits public property

public int[] bits
return int[]

size public property

public int size
return int