BitSet Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class implements a vector of bits that grows as needed.
[Android.Runtime.Register("java/util/BitSet", DoNotGenerateAcw=true)]
public class BitSet : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable, Java.Lang.ICloneable
[<Android.Runtime.Register("java/util/BitSet", DoNotGenerateAcw=true)>]
type BitSet = class
inherit Object
interface ISerializable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
interface ICloneable
- Inheritance
- Attributes
- Implements
Remarks
This class implements a vector of bits that grows as needed. Each component of the bit set has a boolean
value. The bits of a BitSet
are indexed by nonnegative integers. Individual indexed bits can be examined, set, or cleared. One BitSet
may be used to modify the contents of another BitSet
through logical AND, logical inclusive OR, and logical exclusive OR operations.
By default, all bits in the set initially have the value false
.
Every bit set has a current size, which is the number of bits of space currently in use by the bit set. Note that the size is related to the implementation of a bit set, so it may change with implementation. The length of a bit set relates to logical length of a bit set and is defined independently of implementation.
Unless otherwise noted, passing a null parameter to any of the methods in a BitSet
will result in a NullPointerException
.
A BitSet
is not safe for multithreaded use without external synchronization.
Added in 1.0.
Java documentation for java.util.BitSet
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
BitSet() |
Creates a new bit set. |
BitSet(Int32) |
Creates a bit set whose initial size is large enough to explicitly
represent bits with indices in the range |
BitSet(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Properties
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
IsEmpty |
Returns true if this |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Methods
And(BitSet) |
Performs a logical <b>AND</b> of this target bit set with the argument bit set. |
AndNot(BitSet) |
Clears all of the bits in this |
Cardinality() |
Returns the number of bits set to |
Clear() |
Sets all of the bits in this BitSet to |
Clear(Int32, Int32) |
Sets the bits from the specified |
Clear(Int32) |
Sets the bit specified by the index to |
Clone() |
Cloning this |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
Flip(Int32, Int32) |
Sets each bit from the specified |
Flip(Int32) |
Sets the bit at the specified index to the complement of its current value. |
Get(Int32, Int32) |
Returns a new |
Get(Int32) |
Returns the value of the bit with the specified index. |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
Intersects(BitSet) |
Returns true if the specified |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Length() |
Returns the "logical size" of this |
NextClearBit(Int32) |
Returns the index of the first bit that is set to |
NextSetBit(Int32) |
Returns the index of the first bit that is set to |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
Or(BitSet) |
Performs a logical <b>OR</b> of this bit set with the bit set argument. |
PreviousClearBit(Int32) |
Returns the index of the nearest bit that is set to |
PreviousSetBit(Int32) |
Returns the index of the nearest bit that is set to |
Set(Int32, Boolean) |
Sets the bit at the specified index to the specified value. |
Set(Int32, Int32, Boolean) |
Sets the bits from the specified |
Set(Int32, Int32) |
Sets the bits from the specified |
Set(Int32) |
Sets the bit at the specified index to |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
Size() |
Returns the number of bits of space actually in use by this
|
ToArray<T>() | (Inherited from Object) |
ToByteArray() |
Returns a new byte array containing all the bits in this bit set. |
ToLongArray() |
Returns a new long array containing all the bits in this bit set. |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
ValueOf(Byte[]) |
Returns a new bit set containing all the bits in the given byte array. |
ValueOf(ByteBuffer) |
Returns a new bit set containing all the bits in the given byte buffer between its position and limit. |
ValueOf(Int64[]) |
Returns a new bit set containing all the bits in the given long array. |
ValueOf(LongBuffer) |
Returns a new bit set containing all the bits in the given long buffer between its position and limit. |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Xor(BitSet) |
Performs a logical <b>XOR</b> of this bit set with the bit set argument. |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |