Accept the indexing pool from which numbers are selected and returned.
Accept the indexing pool from which numbers are selected and returned.
Correct its format to suit the current NumberSelector
algorithms.
All of the numbers are sorted to their proper indexed position in the Array
.
Every other number is an invalid negative-one (-1).
The selectionIndex
is also set to an invalid negative-one, as per the requirements of the selector.
The ret
index is set to index zero.
the Array
of Int
numbers
Get the specified number and the specified number only.
Get the specified number and the specified number only.
the Array
of Int
numbers from which to draw a new number
an Int
number
Give a number back to a specific collection following the principles of this selector.
By default, a simple policy for returning numbers has been provided.
Give a number back to a specific collection following the principles of this selector.
By default, a simple policy for returning numbers has been provided.
This will not be sufficient for all selection actions that can be implemented so override
where necessary.
Return
is under no obligation to leave its parameter Array
unmodified.
In fact, it should modify it by default to provide additional feedback of its process.
Pass a copy if data mutation is a concern.
the number to be returned
the Array
of Int
numbers to which the number is to be returned
true
, if this return was successful; false
, otherwise
Change the future selection index to match the number the user wants.
Change the future selection index to match the number the user wants.
Call Get
to complete process.
the number
The index for the selector when performing a number return action, then modified for the "next" index.
The index for the selector when performing a number return action, then modified for the "next" index.
The index for the selector when performing a number selection action, then modified to the "next" index.
The index for the selector when performing a number selection action, then modified to the "next" index.
Get a specific number from a pool of numbers.