C# Class ZXing.Common.BitArray

A simple, fast array of bits, represented compactly by an array of ints internally.
Afficher le fichier Open project: Redth/ZXing.Net.Mobile Class Usage Examples

Méthodes publiques

Méthode Description
BitArray ( ) : System
BitArray ( int size ) : System
Clone ( ) : object

Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt.

Equals ( Object o ) : bool

Determines whether the specified System.Object is equal to this instance.

GetHashCode ( ) : int

Returns a hash code for this instance.

ToString ( ) : String

Returns a System.String that represents this instance.

appendBit ( bool bit ) : void

Appends the bit.

appendBitArray ( BitArray other ) : void
appendBits ( int value, int numBits ) : void

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.

clear ( ) : void

Clears all bits (sets to false).

flip ( int i ) : void

Flips bit i.

getNextSet ( int from ) : int

Gets the next set.

getNextUnset ( int from ) : int

see getNextSet(int)

isRange ( int start, int end, bool value ) : 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.

setRange ( int start, int end ) : void

Sets a range of bits.

this ( int i ) : bool
toBytes ( int bitOffset, byte array, int offset, int numBytes ) : void

Toes the bytes.

xor ( BitArray other ) : void

Private Methods

Méthode Description
BitArray ( int bits, int size ) : System
ensureCapacity ( int size ) : void
makeArray ( int size ) : int[]
numberOfTrailingZeros ( int num ) : int

Method Details

BitArray() public méthode

public BitArray ( ) : System
Résultat System

BitArray() public méthode

public BitArray ( int size ) : System
size int
Résultat System

Clone() public méthode

Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt.
public Clone ( ) : object
Résultat object

Equals() public méthode

Determines whether the specified System.Object is equal to this instance.
public Equals ( Object o ) : bool
o Object The to compare with this instance.
Résultat bool

GetHashCode() public méthode

Returns a hash code for this instance.
public GetHashCode ( ) : int
Résultat int

ToString() public méthode

Returns a System.String that represents this instance.
public ToString ( ) : String
Résultat String

appendBit() public méthode

Appends the bit.
public appendBit ( bool bit ) : void
bit bool The bit.
Résultat void

appendBitArray() public méthode

public appendBitArray ( BitArray other ) : void
other BitArray
Résultat void

appendBits() public méthode

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.
public appendBits ( int value, int numBits ) : void
value int containing bits to append
numBits int bits from value to append
Résultat void

clear() public méthode

Clears all bits (sets to false).
public clear ( ) : void
Résultat void

flip() public méthode

Flips bit i.
public flip ( int i ) : void
i int bit to set ///
Résultat void

getNextSet() public méthode

Gets the next set.
public getNextSet ( int from ) : int
from int first bit to check
Résultat int

getNextUnset() public méthode

see getNextSet(int)
public getNextUnset ( int from ) : int
from int index to start looking for unset bit
Résultat int

isRange() public méthode

Efficient method to check if a range of bits is set, or not set.
public isRange ( int start, int end, bool value ) : bool
start int start of range, inclusive. ///
end int end of range, exclusive ///
value bool if true, checks that bits in range are set, otherwise checks that they are not set ///
Résultat bool

reverse() public méthode

Reverses all bits in the array.
public reverse ( ) : void
Résultat void

setBulk() public méthode

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. ///
Résultat void

setRange() public méthode

Sets a range of bits.
public setRange ( int start, int end ) : void
start int start of range, inclusive.
end int end of range, exclusive
Résultat void

this() public méthode

public this ( int i ) : bool
i int
Résultat bool

toBytes() public méthode

Toes the bytes.
public toBytes ( int bitOffset, byte array, int offset, int numBytes ) : void
bitOffset int first bit to start writing
array byte array to write into. Bytes are written most-significant byte first. This is the opposite /// of the internal representation, which is exposed by BitArray
offset int position in array to start writing
numBytes int how many bytes to write
Résultat void

xor() public méthode

public xor ( BitArray other ) : void
other BitArray
Résultat void