new IntegerPool()
Integer pool which returns consistently increasing integers while integers
are in use, and previously-used integers when possible.
Members
(non-null) next_int :number
The next integer to return if no more integers remain.
Type:
- number
Methods
free(integernon-null)
Frees the given integer, allowing it to be reused.
Parameters:
Name | Type | Description |
---|---|---|
integer |
number | The integer to free. |
next() → (non-null) {number}
Returns the next available integer in the pool. If possible, a previously
used integer will be returned.
Returns:
The next available integer.
- Type
- number