RingNumberAllocator:
Filter:

RingNumberAllocator : Object

cyclic number allocator within a specified range
Source: Engine.sc

Description

Continuously cycles through the range of numbers, starting over from the beginning once the end of the range is reached.

Class Methods

RingNumberAllocator.new(lo, hi)

make a new instance, with lo and hi values.

Arguments:

lo

initial value

hi

maximum

Inherited class methods

Instance Methods

.alloc

Allocate next number. After hi value returns lo.

Returns:

(describe returnvalue here)

.init

Reset allocator to its initial state.

Inherited instance methods

Examples