public class RandomUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ALL_CHAR |
static String |
LOWER_CHAR |
static String |
NUMBER_CHAR |
static Random |
RANDOM |
static String |
SYMBOL_CHAR |
static int |
TPPE_NUMBER_ALL_CHAR |
static int |
TYPE_NUMBER |
static int |
TYPE_NUMBER_LOWER_CHAR |
static int |
TYPE_NUMBER_LOWER_UPPER_CHAR |
static String |
UPPER_CHAR |
| 构造器和说明 |
|---|
RandomUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
getRandomInt(int max)
随机生成0-max之间整数
|
static int |
getRandomInt(int max,
int min)
随机生成min-max之间整数
|
static String |
getRandomStr(int length,
int type)
生成随机字符串
|
public static String NUMBER_CHAR
public static String LOWER_CHAR
public static String UPPER_CHAR
public static String SYMBOL_CHAR
public static String ALL_CHAR
public static Random RANDOM
public static int TYPE_NUMBER
public static int TYPE_NUMBER_LOWER_CHAR
public static int TYPE_NUMBER_LOWER_UPPER_CHAR
public static int TPPE_NUMBER_ALL_CHAR
public static String getRandomStr(int length, int type)
length - 字符串长度type - 类型:public static int getRandomInt(int max)
max - public static int getRandomInt(int max,
int min)
max - min - Copyright © 2019. All rights reserved.