public static String [ ] generateUniqueIdCache ( String prefix , int count ) { String [ ] cache = new String [ count ] ; SectionUniqueIdCounter counter = new SectionUniqueIdCounter ( prefix ) ; for ( int i = 0 ; i < count ; i ++ ) { cache [ i ] = counter . generateUniqueId ( ) ; } return cache ; }
Creates an array of the generated unique ids for an specified prefix than can be used later to prevent calculate the same String over and over .