All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.enterprisemath.utils.UniqueCodeGenerator Maven / Gradle / Ivy

Go to download

Collection of utility classes for large scale projects focusing on robust and testable code.

There is a newer version: 4.1.1
Show newest version
package com.enterprisemath.utils;

import java.util.Set;


/**
 * Provides functionality to unique code generation.
 * 
 * @author radek.hecl
 *
 */
public interface UniqueCodeGenerator {

    /**
     * Generates code with high probability this will be the globally unique one.
     * 
     * @param prefix prefix of generated code
     * @return generated code
     */
    public String generateUniqueCode(String prefix);

    /**
     * Generates multiple codes with high probability these will be the globally unique ones.
     * 
     * @param prefix prefix of all generated codes
     * @param number number of codes to generate, must be greater than 0
     * @return generated codes
     */
    public Set generateUniqueCodes(String prefix, int number);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy