Class Guacamole.IntegerPool
Defined in: IntegerPool.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Integer pool which returns consistently increasing integers while integers
are in use, and previously-used integers when possible.
|
Field Attributes | Field Name and Description |
---|---|
<inner> |
Reference to this integer pool.
|
The next integer to return if no more integers remain.
|
|
<inner> |
Array of available integers.
|
Method Attributes | Method Name and Description |
---|---|
free(integer)
Frees the given integer, allowing it to be reused.
|
|
next()
Returns the next available integer in the pool.
|
Class Detail
Guacamole.IntegerPool()
Integer pool which returns consistently increasing integers while integers
are in use, and previously-used integers when possible.
Field Detail
<inner>
guac_pool
Reference to this integer pool.
{Number}
next_int
The next integer to return if no more integers remain.
<inner>
{Number[]}
pool
Array of available integers.
Method Detail
free(integer)
Frees the given integer, allowing it to be reused.
- Parameters:
- {Number} integer
- The integer to free.
{Number}
next()
Returns the next available integer in the pool. If possible, a previously
used integer will be returned.
- Returns:
- {Number} The next available integer.