List of utility methods to do Random Name
String | getRandomFileName() get Random File Name String fileName = ""; java.util.Date dt = new java.util.Date(System.currentTimeMillis()); SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddHHmmssSSS"); fileName = fmt.format(dt); return fileName; |
String | getRandomName() get Random Name DateFormat format = new SimpleDateFormat("yyMMddHHmmss"); String formatDate = format.format(new Date()); int random = new Random().nextInt(10000); return formatDate + random; |
String | getRandomName() get Random Name return NAMES[random.nextInt(NAMES.length)];
|
String | getRandomName() get Random Name return firstParts[theRandom.nextInt(firstParts.length - 1)]
+ secondParts[theRandom.nextInt(secondParts.length - 1)];
|
String | randomFileName() random File Name return FILE_PREFIX + ((int) (Math.random() * Integer.MAX_VALUE)) + FILE_SUFFIX; |
String | randomFilename() random Filename return System.currentTimeMillis() + ("" + Math.random()).replaceAll("\\.", ""); |
String | randomIndexName() random Index Name return "index-" + System.currentTimeMillis(); |
String | randomName() Return a generated short, random string return "TMP_" + next++; |
String | randomName() random Name String[] simple = { "an", "ao", "andy", "apple", "blue", "boy", "ben", "bob", "black", "cold", "code", "color", "cream", "cindy", "doctor", "dany", "dog", "dick", "egg", "easy", "editor", "fox", "fade", "fall", "fancy", "green", "gentle", "good", "glass", "happy", "half", "hard", "holidy", "jack", "jade", "jeep", "july", "kid", "kind", "king", "killer", "lucky", "luck", "looser", "lord", "mm", "moon", "magic", "music", "note", "noah", "nil", "nut", "orange", "open", "ok", "old", "pop", "park", "painter", "print", "queen", "quite", "quake", "quail", "red", "rapid", "rabbit", "rose", "soul", "saga", "sailor", "soldier", "tiger", "tag", "trick", "touch", "UFO", "guly", "under", "user", "victor", "visitor", "visual", "void", "world", "wise", "wide", "water", "x-ray", "x", ... |
String | randomName() random Name return names[(int) (Math.random() * names.length)] + " " + names[(int) (Math.random() * names.length)]; |