mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
[cleanup] erefactor/EclipseJdt - Remove trailing whitespace - All lines
EclipseJdt cleanup 'RemoveAllTrailingWhitespace' applied by erefactor. For EclipseJdt see https://www.eclipse.org/eclipse/news/4.18/jdt.php For erefactor see https://github.com/cal101/erefactor
This commit is contained in:
@@ -13,7 +13,7 @@ import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
/**
|
||||
* 圆圈干扰验证码
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
* @since 3.2.3
|
||||
*
|
||||
@@ -23,7 +23,7 @@ public class CircleCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param width 图片宽
|
||||
* @param height 图片高
|
||||
*/
|
||||
@@ -33,7 +33,7 @@ public class CircleCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param width 图片宽
|
||||
* @param height 图片高
|
||||
* @param codeCount 字符个数
|
||||
@@ -44,7 +44,7 @@ public class CircleCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param width 图片宽
|
||||
* @param height 图片高
|
||||
* @param codeCount 字符个数
|
||||
@@ -71,7 +71,7 @@ public class CircleCaptcha extends AbstractCaptcha {
|
||||
// ----------------------------------------------------------------------------------------------------- Private method start
|
||||
/**
|
||||
* 绘制字符串
|
||||
*
|
||||
*
|
||||
* @param g {@link Graphics2D}画笔
|
||||
* @param code 验证码
|
||||
*/
|
||||
@@ -85,7 +85,7 @@ public class CircleCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 画随机干扰
|
||||
*
|
||||
*
|
||||
* @param g {@link Graphics2D}
|
||||
*/
|
||||
private void drawInterfere(Graphics2D g) {
|
||||
|
@@ -5,7 +5,7 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 验证码接口,提供验证码对象接口定义
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
@@ -18,14 +18,14 @@ public interface ICaptcha extends Serializable{
|
||||
|
||||
/**
|
||||
* 获取验证码的文字内容
|
||||
*
|
||||
*
|
||||
* @return 验证码文字内容
|
||||
*/
|
||||
String getCode();
|
||||
|
||||
/**
|
||||
* 验证验证码是否正确,建议忽略大小写
|
||||
*
|
||||
*
|
||||
* @param userInputCode 用户输入的验证码
|
||||
* @return 是否与生成的一直
|
||||
*/
|
||||
@@ -33,7 +33,7 @@ public interface ICaptcha extends Serializable{
|
||||
|
||||
/**
|
||||
* 将验证码写出到目标流中
|
||||
*
|
||||
*
|
||||
* @param out 目标流
|
||||
*/
|
||||
void write(OutputStream out);
|
||||
|
@@ -14,7 +14,7 @@ import cn.hutool.core.util.RandomUtil;
|
||||
|
||||
/**
|
||||
* 使用干扰线方式生成的图形验证码
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
* @since 3.1.2
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ public class LineCaptcha extends AbstractCaptcha {
|
||||
// -------------------------------------------------------------------- Constructor start
|
||||
/**
|
||||
* 构造,默认5位验证码,150条干扰线
|
||||
*
|
||||
*
|
||||
* @param width 图片宽
|
||||
* @param height 图片高
|
||||
*/
|
||||
@@ -34,7 +34,7 @@ public class LineCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param width 图片宽
|
||||
* @param height 图片高
|
||||
* @param codeCount 字符个数
|
||||
@@ -63,7 +63,7 @@ public class LineCaptcha extends AbstractCaptcha {
|
||||
// ----------------------------------------------------------------------------------------------------- Private method start
|
||||
/**
|
||||
* 绘制字符串
|
||||
*
|
||||
*
|
||||
* @param g {@link Graphics}画笔
|
||||
* @param code 验证码
|
||||
*/
|
||||
@@ -77,7 +77,7 @@ public class LineCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 绘制干扰线
|
||||
*
|
||||
*
|
||||
* @param g {@link Graphics2D}画笔
|
||||
*/
|
||||
private void drawInterfere(Graphics2D g) {
|
||||
|
@@ -13,7 +13,7 @@ import java.awt.image.BufferedImage;
|
||||
|
||||
/**
|
||||
* 扭曲干扰验证码
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
* @since 3.2.3
|
||||
*
|
||||
@@ -23,7 +23,7 @@ public class ShearCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param width 图片宽
|
||||
* @param height 图片高
|
||||
*/
|
||||
@@ -33,7 +33,7 @@ public class ShearCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param width 图片宽
|
||||
* @param height 图片高
|
||||
* @param codeCount 字符个数
|
||||
@@ -44,7 +44,7 @@ public class ShearCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param width 图片宽
|
||||
* @param height 图片高
|
||||
* @param codeCount 字符个数
|
||||
@@ -73,7 +73,7 @@ public class ShearCaptcha extends AbstractCaptcha {
|
||||
// ----------------------------------------------------------------------------------------------------- Private method start
|
||||
/**
|
||||
* 绘制字符串
|
||||
*
|
||||
*
|
||||
* @param g {@link Graphics}画笔
|
||||
* @param code 验证码
|
||||
*/
|
||||
@@ -87,7 +87,7 @@ public class ShearCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 扭曲
|
||||
*
|
||||
*
|
||||
* @param g {@link Graphics}
|
||||
* @param w1 w1
|
||||
* @param h1 h1
|
||||
@@ -100,7 +100,7 @@ public class ShearCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* X坐标扭曲
|
||||
*
|
||||
*
|
||||
* @param g {@link Graphics}
|
||||
* @param w1 宽
|
||||
* @param h1 高
|
||||
@@ -125,7 +125,7 @@ public class ShearCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* Y坐标扭曲
|
||||
*
|
||||
*
|
||||
* @param g {@link Graphics}
|
||||
* @param w1 宽
|
||||
* @param h1 高
|
||||
@@ -150,7 +150,7 @@ public class ShearCaptcha extends AbstractCaptcha {
|
||||
|
||||
/**
|
||||
* 干扰线
|
||||
*
|
||||
*
|
||||
* @param g {@link Graphics}
|
||||
* @param x1 x1
|
||||
* @param y1 y1
|
||||
|
@@ -5,21 +5,21 @@ import cn.hutool.core.util.RandomUtil;
|
||||
/**
|
||||
* 随机字符验证码生成器<br>
|
||||
* 可以通过传入的基础集合和长度随机生成验证码字符
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
* @since 4.1.2
|
||||
*/
|
||||
public abstract class AbstractGenerator implements CodeGenerator {
|
||||
private static final long serialVersionUID = 8685744597154953479L;
|
||||
|
||||
|
||||
/** 基础字符集合,用于随机获取字符串的字符集合 */
|
||||
protected final String baseStr;
|
||||
/** 验证码长度 */
|
||||
protected final int length;
|
||||
|
||||
|
||||
/**
|
||||
* 构造,使用字母+数字做为基础
|
||||
*
|
||||
*
|
||||
* @param count 生成验证码长度
|
||||
*/
|
||||
public AbstractGenerator(int count) {
|
||||
@@ -28,7 +28,7 @@ public abstract class AbstractGenerator implements CodeGenerator {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param baseStr 基础字符集合,用于随机获取字符串的字符集合
|
||||
* @param length 生成验证码长度
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ public abstract class AbstractGenerator implements CodeGenerator {
|
||||
|
||||
/**
|
||||
* 获取长度验证码
|
||||
*
|
||||
*
|
||||
* @return 验证码长度
|
||||
*/
|
||||
public int getLength() {
|
||||
|
@@ -4,7 +4,7 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 验证码文字生成器
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
* @since 4.1.2
|
||||
*/
|
||||
@@ -12,7 +12,7 @@ public interface CodeGenerator extends Serializable{
|
||||
|
||||
/**
|
||||
* 生成验证码
|
||||
*
|
||||
*
|
||||
* @return 验证码
|
||||
*/
|
||||
String generate();
|
||||
@@ -20,7 +20,7 @@ public interface CodeGenerator extends Serializable{
|
||||
/**
|
||||
* 验证用户输入的字符串是否与生成的验证码匹配<br>
|
||||
* 用户通过实现此方法定义验证码匹配方式
|
||||
*
|
||||
*
|
||||
* @param code 生成的随机验证码
|
||||
* @param userInputCode 用户输入的验证码
|
||||
* @return 是否验证通过
|
||||
|
@@ -7,7 +7,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* 数字计算验证码生成器
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
* @since 4.1.2
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ public class MathGenerator implements CodeGenerator {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param numberLength 参与计算最大数字位数
|
||||
*/
|
||||
public MathGenerator(int numberLength) {
|
||||
@@ -75,7 +75,7 @@ public class MathGenerator implements CodeGenerator {
|
||||
|
||||
/**
|
||||
* 根据长度获取参与计算数字最大值
|
||||
*
|
||||
*
|
||||
* @return 最大值
|
||||
*/
|
||||
private int getLimit() {
|
||||
|
Reference in New Issue
Block a user