Initializes the IDPool with a given initial capacity.
Initial number of IDs available; the pool will expand dynamically if needed.
Marks a specific ID as used in the pool.
Numeric ID to mark as consumed.
Returns the first available numeric ID from the pool. If all IDs are used, the pool automatically expands and returns the next available ID.
Returned ID must be used with IDPool.consume( ID )
The available ID as a number.
Releases a previously consumed ID, making it available for future allocation.
Numeric ID to release.
IDPool
Manages a pool of unique numeric IDs, providing efficient allocation and release of IDs using an internal bit array. Supports automatic capacity expansion when all IDs are in use.