Constructor
Smallest integer available to the pool
Number of integers available in the pool.
ReadonlymaxNumber of integers available in the pool.
ReadonlymaxMaximum integer available in the pool.
ReadonlyminSmallest integer available to the pool
ReadonlyoutCount of integers still available in the pool.
If true then no more integers can be popped from the pool (by calling pop).
true then no more integers can be popped from the pool.
If true then pool is full.
true if pool is full.
Reset pool. Makes all integers available again.
Peek on next integers that will be returned when pop is called popCallCount number
of times (default is 1, must be >= 1).
If pool would be empty after popCallCount number of calls to pop then outOfNumbers is returned.
Default is 1, must be >= 1.
Next integer that will be returned when pop is called popCallCount number of
of times.
Pop next available integer. Can be a number that have been pushed by calling push.
Next available integer. Will be outOfNumbers if pool is empty.
Push a integer to the pool. It must previously have been popped by calling pop. A later call to pop may then return it.
number to push.
true if integer was added to the pool. Otherwise false. Either the integer already existed in the pool
or it has never been popped by calling pop.
A pool of integers in a specified range [min, max]. Integers can be popped from the pool and later pushed back so they become available for pop again. When all numbers in range [min, max] have been popped the pool is empty. The pool is optimized to use as little memory as possible with the assumption that push is called a lot less than pop.