类 RandomFormulaCodeGenerator
java.lang.Object
cn.zhxu.toys.captcha.impl.RandomFormulaCodeGenerator
- 所有已实现的接口:
CodeGenerator
运算式生成器
Created by junxiang on 2019/8/2
-
嵌套类概要
从接口继承的嵌套类/接口 cn.zhxu.toys.captcha.CodeGenerator
CodeGenerator.CodeResult -
构造器概要
构造器构造器说明RandomFormulaCodeGenerator(int length) RandomFormulaCodeGenerator(int length, boolean allowNegative) -
方法概要
修饰符和类型方法说明generate()生成一个验证码intbooleanvoidsetAllowNegative(boolean allowNegative) voidsetLength(int length)
-
构造器详细资料
-
RandomFormulaCodeGenerator
public RandomFormulaCodeGenerator() -
RandomFormulaCodeGenerator
public RandomFormulaCodeGenerator(int length) -
RandomFormulaCodeGenerator
public RandomFormulaCodeGenerator(int length, boolean allowNegative)
-
-
方法详细资料
-
generate
从接口复制的说明:CodeGenerator生成一个验证码- 指定者:
generate在接口中CodeGenerator- 返回:
- CodeResult
-
setLength
public void setLength(int length) -
getLength
public int getLength() -
isAllowNegative
public boolean isAllowNegative() -
setAllowNegative
public void setAllowNegative(boolean allowNegative)
-