|
|
|
|
@ -3,8 +3,10 @@ package externalsystem.testpool;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
|
|
public class RandomUtil {
|
|
|
|
|
|
|
|
|
|
public static String randomHangulName() {
|
|
|
|
|
List<String> seong = Arrays.asList(
|
|
|
|
|
"김", "이", "박", "최", "정", "강", "조", "윤", "장", "임", "한", "오", "서", "신", "권", "황", "안",
|
|
|
|
|
@ -32,4 +34,24 @@ public class RandomUtil {
|
|
|
|
|
Collections.shuffle(irum);
|
|
|
|
|
return seong.get(0) + irum.get(0) + irum.get(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String randomCarNo() {
|
|
|
|
|
String front_digit = "";
|
|
|
|
|
List<String> middle = Arrays.asList(
|
|
|
|
|
"하", "허", "호",
|
|
|
|
|
"가", "나", "다", "라", "마",
|
|
|
|
|
"거", "너", "더", "러", "머", "서", "어", "저",
|
|
|
|
|
"고", "노", "도", "로", "모", "소", "오", "조",
|
|
|
|
|
"구", "누", "두", "루", "무", "수", "우", "주"
|
|
|
|
|
);
|
|
|
|
|
String back_digit = "";
|
|
|
|
|
|
|
|
|
|
Collections.shuffle(middle);
|
|
|
|
|
|
|
|
|
|
Random random = new Random();
|
|
|
|
|
front_digit = Integer.toString(random.nextInt(799-10)+10);
|
|
|
|
|
back_digit = Integer.toString(random.nextInt(9999-1000)+1000);
|
|
|
|
|
|
|
|
|
|
return front_digit + middle.get(0) + back_digit;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|