public static enum RandomString.RepeatDisposeType extends Enum<RandomString.RepeatDisposeType>
文件名:RandomString.java
用途: 定义在设置随机字符串不允许出现重复,但需要生成的字符串长度大于随机字符串池的长度时的处理方式
编码时间:2021年1月16日下午2:11:36
修改时间:2021年1月16日下午2:11:36
Enum Constant and Description |
---|
DISPOSE_IGNORE
忽略,只生成一个与随机字符串范围长度相同的随机字符串
|
DISPOSE_REPEAT
重复,将随机字符串的生成条件改为允许字符串重复
|
DISPOSE_THROW_EXCEPTION
抛出异常,中断生成字符串的操作
|
Modifier and Type | Method and Description |
---|---|
static RandomString.RepeatDisposeType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RandomString.RepeatDisposeType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RandomString.RepeatDisposeType DISPOSE_IGNORE
public static final RandomString.RepeatDisposeType DISPOSE_THROW_EXCEPTION
public static final RandomString.RepeatDisposeType DISPOSE_REPEAT
public static RandomString.RepeatDisposeType[] values()
for (RandomString.RepeatDisposeType c : RandomString.RepeatDisposeType.values()) System.out.println(c);
public static RandomString.RepeatDisposeType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2024. All rights reserved.