String getNextAlgorithmObjectId ( ) { if ( idsToAlgorithms . size ( ) == Integer . MAX_VALUE ) { throw new IllegalArgumentException ( "Maximum number of algorithm objects reached" ) ; } while ( true ) { String candidate = "ALGORITHM_" + currentAlgorithmId ++ ; if ( isUniqueAlgorithmObjectId ( candidate ) ) { return candidate ; } } }
Generates an unused algorithm id .