class RecoveryCodeGenerator {

    public String generateDelimitedCodeWithSpecifics(CodeGeneratorSource alphabet, char delimiter,
                                                       Map<Integer, Character> specifics, int... groups) {

        StringBuilder codeBuilder = new StringBuilder(generateDelimitedCode(alphabet, delimiter, groups));
        int maxLength = codeBuilder.length();

        for(Map.Entry<Integer, Character> specific : specifics.entrySet()) {
            Reject.ifTrue(specific.getKey() < 0 || specific.getKey() > maxLength);
            Reject.ifNull(specific.getValue());
            codeBuilder.replace(specific.getKey(), specific.getKey() + 1, String.valueOf(specific.getValue()));
        }

        return codeBuilder.toString();
    }

    public  RecoveryCodeGenerator(SecureRandom secureRandom, int retryMaximum);
    @Inject public  RecoveryCodeGenerator(SecureRandom secureRandom);

}