[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:
cal101 2021-02-27 09:54:18 +00:00
parent b285db71cd
commit e41c676ed5
20 changed files with 89 additions and 89 deletions

View File

@ -6,7 +6,7 @@ import cn.hutool.core.util.StrUtil;
/** /**
* 随机字符验证码生成器<br> * 随机字符验证码生成器<br>
* 可以通过传入的基础集合和长度随机生成验证码字符 * 可以通过传入的基础集合和长度随机生成验证码字符
* *
* @author looly * @author looly
* @since 4.1.2 * @since 4.1.2
*/ */
@ -15,7 +15,7 @@ public class RandomGenerator extends AbstractGenerator {
/** /**
* 构造使用字母+数字做为基础 * 构造使用字母+数字做为基础
* *
* @param count 生成验证码长度 * @param count 生成验证码长度
*/ */
public RandomGenerator(int count) { public RandomGenerator(int count) {
@ -24,7 +24,7 @@ public class RandomGenerator extends AbstractGenerator {
/** /**
* 构造 * 构造
* *
* @param baseStr 基础字符集合用于随机获取字符串的字符集合 * @param baseStr 基础字符集合用于随机获取字符串的字符集合
* @param length 生成验证码长度 * @param length 生成验证码长度
*/ */
@ -36,7 +36,7 @@ public class RandomGenerator extends AbstractGenerator {
public String generate() { public String generate() {
return RandomUtil.randomString(this.baseStr, this.length); return RandomUtil.randomString(this.baseStr, this.length);
} }
@Override @Override
public boolean verify(String code, String userInputCode) { public boolean verify(String code, String userInputCode) {
if (StrUtil.isNotBlank(userInputCode)) { if (StrUtil.isNotBlank(userInputCode)) {

View File

@ -1,6 +1,6 @@
/** /**
* 验证码生成策略实现 * 验证码生成策略实现
* *
* @author looly * @author looly
* @since 4.1.2 * @since 4.1.2
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* 图片验证码实现 * 图片验证码实现
* *
* @author looly * @author looly
* *
*/ */

View File

@ -4,7 +4,7 @@ import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
public class CaptchaUtilTest { public class CaptchaUtilTest {
@Test @Test
@Ignore @Ignore
public void createTest() { public void createTest() {

View File

@ -43,7 +43,7 @@ public class CombinationAnnotationElement implements AnnotatedElement, Serializa
/** /**
* 构造 * 构造
* *
* @param element 需要解析注解的元素可以是ClassMethodFieldConstructorReflectPermission * @param element 需要解析注解的元素可以是ClassMethodFieldConstructorReflectPermission
*/ */
public CombinationAnnotationElement(AnnotatedElement element) { public CombinationAnnotationElement(AnnotatedElement element) {
@ -73,17 +73,17 @@ public class CombinationAnnotationElement implements AnnotatedElement, Serializa
final Collection<Annotation> annotations = this.declaredAnnotationMap.values(); final Collection<Annotation> annotations = this.declaredAnnotationMap.values();
return annotations.toArray(new Annotation[0]); return annotations.toArray(new Annotation[0]);
} }
/** /**
* 初始化 * 初始化
* *
* @param element 元素 * @param element 元素
*/ */
private void init(AnnotatedElement element) { private void init(AnnotatedElement element) {
final Annotation[] declaredAnnotations = element.getDeclaredAnnotations(); final Annotation[] declaredAnnotations = element.getDeclaredAnnotations();
this.declaredAnnotationMap = new HashMap<>(); this.declaredAnnotationMap = new HashMap<>();
parseDeclared(declaredAnnotations); parseDeclared(declaredAnnotations);
final Annotation[] annotations = element.getAnnotations(); final Annotation[] annotations = element.getAnnotations();
if(Arrays.equals(declaredAnnotations, annotations)) { if(Arrays.equals(declaredAnnotations, annotations)) {
this.annotationMap = this.declaredAnnotationMap; this.annotationMap = this.declaredAnnotationMap;
@ -109,7 +109,7 @@ public class CombinationAnnotationElement implements AnnotatedElement, Serializa
} }
} }
} }
/** /**
* 进行递归解析注解直到全部都是元注解为止 * 进行递归解析注解直到全部都是元注解为止
* *

View File

@ -1,6 +1,6 @@
/** /**
* 注解包提供增强型注解和注解工具类 * 注解包提供增强型注解和注解工具类
* *
* @author looly * @author looly
* *
*/ */

View File

@ -11,9 +11,9 @@ import cn.hutool.core.lang.func.Func0;
*/ */
public enum BeanDescCache { public enum BeanDescCache {
INSTANCE; INSTANCE;
private final SimpleCache<Class<?>, BeanDesc> bdCache = new SimpleCache<>(); private final SimpleCache<Class<?>, BeanDesc> bdCache = new SimpleCache<>();
/** /**
* 获得属性名和{@link BeanDesc}Map映射 * 获得属性名和{@link BeanDesc}Map映射
* @param beanClass Bean的类 * @param beanClass Bean的类

View File

@ -13,19 +13,19 @@ public class BeanException extends RuntimeException{
public BeanException(Throwable e) { public BeanException(Throwable e) {
super(ExceptionUtil.getMessage(e), e); super(ExceptionUtil.getMessage(e), e);
} }
public BeanException(String message) { public BeanException(String message) {
super(message); super(message);
} }
public BeanException(String messageTemplate, Object... params) { public BeanException(String messageTemplate, Object... params) {
super(StrUtil.format(messageTemplate, params)); super(StrUtil.format(messageTemplate, params));
} }
public BeanException(String message, Throwable throwable) { public BeanException(String message, Throwable throwable) {
super(message, throwable); super(message, throwable);
} }
public BeanException(Throwable throwable, String messageTemplate, Object... params) { public BeanException(Throwable throwable, String messageTemplate, Object... params) {
super(StrUtil.format(messageTemplate, params), throwable); super(StrUtil.format(messageTemplate, params), throwable);
} }

View File

@ -23,9 +23,9 @@ import java.util.Map;
* <li>.表达式可以获取Bean对象中的属性字段值或者Map中key对应的值</li> * <li>.表达式可以获取Bean对象中的属性字段值或者Map中key对应的值</li>
* <li>[]表达式可以获取集合等对象中对应index的值</li> * <li>[]表达式可以获取集合等对象中对应index的值</li>
* </ol> * </ol>
* *
* 表达式栗子 * 表达式栗子
* *
* <pre> * <pre>
* persion * persion
* persion.name * persion.name
@ -33,7 +33,7 @@ import java.util.Map;
* person.friends[5].name * person.friends[5].name
* ['person']['friends'][5]['name'] * ['person']['friends'][5]['name']
* </pre> * </pre>
* *
* @author Looly * @author Looly
* @since 4.0.6 * @since 4.0.6
*/ */
@ -54,9 +54,9 @@ public class BeanPath implements Serializable{
* <li>.表达式可以获取Bean对象中的属性字段值或者Map中key对应的值</li> * <li>.表达式可以获取Bean对象中的属性字段值或者Map中key对应的值</li>
* <li>[]表达式可以获取集合等对象中对应index的值</li> * <li>[]表达式可以获取集合等对象中对应index的值</li>
* </ol> * </ol>
* *
* 表达式栗子 * 表达式栗子
* *
* <pre> * <pre>
* persion * persion
* persion.name * persion.name
@ -64,7 +64,7 @@ public class BeanPath implements Serializable{
* person.friends[5].name * person.friends[5].name
* ['person']['friends'][5]['name'] * ['person']['friends'][5]['name']
* </pre> * </pre>
* *
* @param expression 表达式 * @param expression 表达式
* @return BeanPath * @return BeanPath
*/ */
@ -74,7 +74,7 @@ public class BeanPath implements Serializable{
/** /**
* 构造 * 构造
* *
* @param expression 表达式 * @param expression 表达式
*/ */
public BeanPath(String expression) { public BeanPath(String expression) {
@ -83,7 +83,7 @@ public class BeanPath implements Serializable{
/** /**
* 获取Bean中对应表达式的值 * 获取Bean中对应表达式的值
* *
* @param bean Bean对象或Map或List等 * @param bean Bean对象或Map或List等
* @return 如果对应值不存在则返回null * @return 如果对应值不存在则返回null
*/ */
@ -95,29 +95,29 @@ public class BeanPath implements Serializable{
* 设置表达式指定位置或filed对应的值<br> * 设置表达式指定位置或filed对应的值<br>
* 若表达式指向一个List则设置其坐标对应位置的值若指向Map则put对应key的值Bean则设置字段的值<br> * 若表达式指向一个List则设置其坐标对应位置的值若指向Map则put对应key的值Bean则设置字段的值<br>
* 注意 * 注意
* *
* <pre> * <pre>
* 1. 如果为List如果下标不大于List长度则替换原有值否则追加值 * 1. 如果为List如果下标不大于List长度则替换原有值否则追加值
* 2. 如果为数组如果下标不大于数组长度则替换原有值否则追加值 * 2. 如果为数组如果下标不大于数组长度则替换原有值否则追加值
* </pre> * </pre>
* *
* @param bean BeanMap或List * @param bean BeanMap或List
* @param value * @param value
*/ */
public void set(Object bean, Object value) { public void set(Object bean, Object value) {
set(bean, this.patternParts, value); set(bean, this.patternParts, value);
} }
/** /**
* 设置表达式指定位置或filed对应的值<br> * 设置表达式指定位置或filed对应的值<br>
* 若表达式指向一个List则设置其坐标对应位置的值若指向Map则put对应key的值Bean则设置字段的值<br> * 若表达式指向一个List则设置其坐标对应位置的值若指向Map则put对应key的值Bean则设置字段的值<br>
* 注意 * 注意
* *
* <pre> * <pre>
* 1. 如果为List如果下标不大于List长度则替换原有值否则追加值 * 1. 如果为List如果下标不大于List长度则替换原有值否则追加值
* 2. 如果为数组如果下标不大于数组长度则替换原有值否则追加值 * 2. 如果为数组如果下标不大于数组长度则替换原有值否则追加值
* </pre> * </pre>
* *
* @param bean BeanMap或List * @param bean BeanMap或List
* @param patternParts 表达式块列表 * @param patternParts 表达式块列表
* @param value * @param value
@ -135,7 +135,7 @@ public class BeanPath implements Serializable{
// ------------------------------------------------------------------------------------------------------------------------------------- Private method start // ------------------------------------------------------------------------------------------------------------------------------------- Private method start
/** /**
* 获取Bean中对应表达式的值 * 获取Bean中对应表达式的值
* *
* @param patternParts 表达式分段列表 * @param patternParts 表达式分段列表
* @param bean Bean对象或Map或List等 * @param bean Bean对象或Map或List等
* @param ignoreLast 是否忽略最后一个值忽略最后一个值则用于set否则用于read * @param ignoreLast 是否忽略最后一个值忽略最后一个值则用于set否则用于read
@ -215,7 +215,7 @@ public class BeanPath implements Serializable{
/** /**
* 初始化 * 初始化
* *
* @param expression 表达式 * @param expression 表达式
*/ */
private void init(String expression) { private void init(String expression) {
@ -277,7 +277,7 @@ public class BeanPath implements Serializable{
/** /**
* 对于非表达式去除单引号 * 对于非表达式去除单引号
* *
* @param expression 表达式 * @param expression 表达式
* @return 表达式 * @return 表达式
*/ */

View File

@ -25,7 +25,7 @@ import java.util.Map;
* 3. Map Bean * 3. Map Bean
* 4. Map Map * 4. Map Map
* </pre> * </pre>
* *
* @author looly * @author looly
* *
* @param <T> 目标对象类型 * @param <T> 目标对象类型
@ -33,7 +33,7 @@ import java.util.Map;
*/ */
public class BeanCopier<T> implements Copier<T>, Serializable { public class BeanCopier<T> implements Copier<T>, Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 源对象 */ /** 源对象 */
private final Object source; private final Object source;
/** 目标对象 */ /** 目标对象 */
@ -45,7 +45,7 @@ public class BeanCopier<T> implements Copier<T>, Serializable {
/** /**
* 创建BeanCopier * 创建BeanCopier
* *
* @param <T> 目标Bean类型 * @param <T> 目标Bean类型
* @param source 来源对象可以是Bean或者Map * @param source 来源对象可以是Bean或者Map
* @param dest 目标Bean对象 * @param dest 目标Bean对象
@ -58,7 +58,7 @@ public class BeanCopier<T> implements Copier<T>, Serializable {
/** /**
* 创建BeanCopier * 创建BeanCopier
* *
* @param <T> 目标Bean类型 * @param <T> 目标Bean类型
* @param source 来源对象可以是Bean或者Map * @param source 来源对象可以是Bean或者Map
* @param dest 目标Bean对象 * @param dest 目标Bean对象
@ -72,7 +72,7 @@ public class BeanCopier<T> implements Copier<T>, Serializable {
/** /**
* 构造 * 构造
* *
* @param source 来源对象可以是Bean或者Map * @param source 来源对象可以是Bean或者Map
* @param dest 目标Bean对象 * @param dest 目标Bean对象
* @param destType 目标的泛型类型用于标注有泛型参数的Bean对象 * @param destType 目标的泛型类型用于标注有泛型参数的Bean对象
@ -115,7 +115,7 @@ public class BeanCopier<T> implements Copier<T>, Serializable {
/** /**
* Bean和Bean之间属性拷贝 * Bean和Bean之间属性拷贝
* *
* @param providerBean 来源Bean * @param providerBean 来源Bean
* @param destBean 目标Bean * @param destBean 目标Bean
*/ */
@ -125,7 +125,7 @@ public class BeanCopier<T> implements Copier<T>, Serializable {
/** /**
* Map转Bean属性拷贝 * Map转Bean属性拷贝
* *
* @param map Map * @param map Map
* @param bean Bean * @param bean Bean
*/ */
@ -138,7 +138,7 @@ public class BeanCopier<T> implements Copier<T>, Serializable {
/** /**
* Map转Map * Map转Map
* *
* @param source 源Map * @param source 源Map
* @param dest 目标Map * @param dest 目标Map
*/ */
@ -151,7 +151,7 @@ public class BeanCopier<T> implements Copier<T>, Serializable {
/** /**
* 对象转Map * 对象转Map
* *
* @param bean bean对象 * @param bean bean对象
* @param targetMap 目标的Map * @param targetMap 目标的Map
* @since 4.1.22 * @since 4.1.22
@ -201,7 +201,7 @@ public class BeanCopier<T> implements Copier<T>, Serializable {
/** /**
* 值提供器转Bean<br> * 值提供器转Bean<br>
* 此方法通过遍历目标Bean的字段从ValueProvider查找对应值 * 此方法通过遍历目标Bean的字段从ValueProvider查找对应值
* *
* @param valueProvider 值提供器 * @param valueProvider 值提供器
* @param bean Bean * @param bean Bean
*/ */

View File

@ -6,17 +6,17 @@ import java.lang.reflect.Type;
* 值提供者用于提供Bean注入时参数对应值得抽象接口<br> * 值提供者用于提供Bean注入时参数对应值得抽象接口<br>
* 继承或匿名实例化此接口<br> * 继承或匿名实例化此接口<br>
* 在Bean注入过程中Bean获得字段名通过外部方式根据这个字段名查找相应的字段值然后注入Bean<br> * 在Bean注入过程中Bean获得字段名通过外部方式根据这个字段名查找相应的字段值然后注入Bean<br>
* *
* @author Looly * @author Looly
* @param <T> KEY类型一般情况下为 {@link String} * @param <T> KEY类型一般情况下为 {@link String}
* *
*/ */
public interface ValueProvider<T>{ public interface ValueProvider<T>{
/** /**
* 获取值<br> * 获取值<br>
* 返回值一般需要匹配被注入类型如果不匹配会调用默认转换 Convert#convert(Type, Object)实现转换 * 返回值一般需要匹配被注入类型如果不匹配会调用默认转换 Convert#convert(Type, Object)实现转换
* *
* @param key Bean对象中参数名 * @param key Bean对象中参数名
* @param valueType 被注入的值的类型 * @param valueType 被注入的值的类型
* @return 对应参数名的值 * @return 对应参数名的值
@ -26,7 +26,7 @@ public interface ValueProvider<T>{
/** /**
* 是否包含指定KEY如果不包含则忽略注入<br> * 是否包含指定KEY如果不包含则忽略注入<br>
* 此接口方法单独需要实现的意义在于有些值提供者比如Mapkey是存在的但是value为null此时如果需要注入这个null需要根据此方法判断 * 此接口方法单独需要实现的意义在于有些值提供者比如Mapkey是存在的但是value为null此时如果需要注入这个null需要根据此方法判断
* *
* @param key Bean对象中参数名 * @param key Bean对象中参数名
* @return 是否包含指定KEY * @return 是否包含指定KEY
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* Bean拷贝实现包括拷贝选项等 * Bean拷贝实现包括拷贝选项等
* *
* @author looly * @author looly
* *
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* Bean值提供者方式封装 * Bean值提供者方式封装
* *
* @author looly * @author looly
* *
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* Bean相关操作包括Bean信息描述Bean路径表达式动态BeanBean工具等 * Bean相关操作包括Bean信息描述Bean路径表达式动态BeanBean工具等
* *
* @author looly * @author looly
* *
*/ */

View File

@ -4,7 +4,7 @@ import java.io.Serializable;
/** /**
* 建造者模式接口定义 * 建造者模式接口定义
* *
* @param <T> 建造对象类型 * @param <T> 建造对象类型
* @author Looly * @author Looly
* @since 4.2.2 * @since 4.2.2
@ -12,7 +12,7 @@ import java.io.Serializable;
public interface Builder<T> extends Serializable{ public interface Builder<T> extends Serializable{
/** /**
* 构建 * 构建
* *
* @return 被构建的对象 * @return 被构建的对象
*/ */
T build(); T build();

View File

@ -8,7 +8,7 @@ import java.lang.reflect.Modifier;
import java.util.Collection; import java.util.Collection;
import java.util.Comparator; import java.util.Comparator;
/** /**
* 用于构建 {@link java.lang.Comparable#compareTo(Object)} 方法的辅助工具 * 用于构建 {@link java.lang.Comparable#compareTo(Object)} 方法的辅助工具
* *
* <p> * <p>
@ -33,7 +33,7 @@ import java.util.Comparator;
* } * }
* } * }
* </pre> * </pre>
* *
* 字段值按照顺序比较如果某个字段返回非0结果比较终止使用{@code toComparison()}返回结果后续比较忽略 * 字段值按照顺序比较如果某个字段返回非0结果比较终止使用{@code toComparison()}返回结果后续比较忽略
* *
* <p> * <p>
@ -52,7 +52,7 @@ import java.util.Comparator;
*/ */
public class CompareToBuilder implements Builder<Integer> { public class CompareToBuilder implements Builder<Integer> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 当前比较状态 */ /** 当前比较状态 */
private int comparison; private int comparison;
@ -65,7 +65,7 @@ public class CompareToBuilder implements Builder<Integer> {
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* 通过反射比较两个Bean对象对象字段可以为private比较规则如下 * 通过反射比较两个Bean对象对象字段可以为private比较规则如下
* *
* <ul> * <ul>
@ -94,7 +94,7 @@ public class CompareToBuilder implements Builder<Integer> {
* <p>Compares two <code>Object</code>s via reflection.</p> * <p>Compares two <code>Object</code>s via reflection.</p>
* *
* <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code> * <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code>
* is used to bypass normal access control checks. This will fail under a * is used to bypass normal access control checks. This will fail under a
* security manager unless the appropriate permissions are set.</p> * security manager unless the appropriate permissions are set.</p>
* *
* <ul> * <ul>
@ -126,7 +126,7 @@ public class CompareToBuilder implements Builder<Integer> {
* <p>Compares two <code>Object</code>s via reflection.</p> * <p>Compares two <code>Object</code>s via reflection.</p>
* *
* <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code> * <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code>
* is used to bypass normal access control checks. This will fail under a * is used to bypass normal access control checks. This will fail under a
* security manager unless the appropriate permissions are set.</p> * security manager unless the appropriate permissions are set.</p>
* *
* <ul> * <ul>
@ -159,7 +159,7 @@ public class CompareToBuilder implements Builder<Integer> {
* <p>Compares two <code>Object</code>s via reflection.</p> * <p>Compares two <code>Object</code>s via reflection.</p>
* *
* <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code> * <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code>
* is used to bypass normal access control checks. This will fail under a * is used to bypass normal access control checks. This will fail under a
* security manager unless the appropriate permissions are set.</p> * security manager unless the appropriate permissions are set.</p>
* *
* <ul> * <ul>
@ -192,7 +192,7 @@ public class CompareToBuilder implements Builder<Integer> {
* <p>Compares two <code>Object</code>s via reflection.</p> * <p>Compares two <code>Object</code>s via reflection.</p>
* *
* <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code> * <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code>
* is used to bypass normal access control checks. This will fail under a * is used to bypass normal access control checks. This will fail under a
* security manager unless the appropriate permissions are set.</p> * security manager unless the appropriate permissions are set.</p>
* *
* <ul> * <ul>
@ -221,10 +221,10 @@ public class CompareToBuilder implements Builder<Integer> {
* @since 2.2 (2.0 as <code>reflectionCompare(Object, Object, boolean, Class)</code>) * @since 2.2 (2.0 as <code>reflectionCompare(Object, Object, boolean, Class)</code>)
*/ */
public static int reflectionCompare( public static int reflectionCompare(
final Object lhs, final Object lhs,
final Object rhs, final Object rhs,
final boolean compareTransients, final boolean compareTransients,
final Class<?> reflectUpToClass, final Class<?> reflectUpToClass,
final String... excludeFields) { final String... excludeFields) {
if (lhs == rhs) { if (lhs == rhs) {
@ -249,7 +249,7 @@ public class CompareToBuilder implements Builder<Integer> {
/** /**
* <p>Appends to <code>builder</code> the comparison of <code>lhs</code> * <p>Appends to <code>builder</code> the comparison of <code>lhs</code>
* to <code>rhs</code> using the fields defined in <code>clazz</code>.</p> * to <code>rhs</code> using the fields defined in <code>clazz</code>.</p>
* *
* @param lhs left-hand object * @param lhs left-hand object
* @param rhs right-hand object * @param rhs right-hand object
* @param clazz <code>Class</code> that defines fields to be compared * @param clazz <code>Class</code> that defines fields to be compared
@ -264,7 +264,7 @@ public class CompareToBuilder implements Builder<Integer> {
final CompareToBuilder builder, final CompareToBuilder builder,
final boolean useTransients, final boolean useTransients,
final String[] excludeFields) { final String[] excludeFields) {
final Field[] fields = clazz.getDeclaredFields(); final Field[] fields = clazz.getDeclaredFields();
AccessibleObject.setAccessible(fields, true); AccessibleObject.setAccessible(fields, true);
for (int i = 0; i < fields.length && builder.comparison == 0; i++) { for (int i = 0; i < fields.length && builder.comparison == 0; i++) {
@ -300,7 +300,7 @@ public class CompareToBuilder implements Builder<Integer> {
comparison = superCompareTo; comparison = superCompareTo;
return this; return this;
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Appends to the <code>builder</code> the comparison of * <p>Appends to the <code>builder</code> the comparison of
@ -312,7 +312,7 @@ public class CompareToBuilder implements Builder<Integer> {
* a <code>null</code> object is less than a non-<code>null</code> object</li> * a <code>null</code> object is less than a non-<code>null</code> object</li>
* <li>Check the object contents</li> * <li>Check the object contents</li>
* </ol> * </ol>
* *
* <p><code>lhs</code> must either be an array or implement {@link Comparable}.</p> * <p><code>lhs</code> must either be an array or implement {@link Comparable}.</p>
* *
* @param lhs left-hand object * @param lhs left-hand object
@ -441,7 +441,7 @@ public class CompareToBuilder implements Builder<Integer> {
/** /**
* Appends to the <code>builder</code> the comparison of * Appends to the <code>builder</code> the comparison of
* two <code>short</code>s. * two <code>short</code>s.
* *
* @param lhs left-hand value * @param lhs left-hand value
* @param rhs right-hand value * @param rhs right-hand value
* @return this - used to chain append calls * @return this - used to chain append calls
@ -473,7 +473,7 @@ public class CompareToBuilder implements Builder<Integer> {
/** /**
* Appends to the <code>builder</code> the comparison of * Appends to the <code>builder</code> the comparison of
* two <code>byte</code>s. * two <code>byte</code>s.
* *
* @param lhs left-hand value * @param lhs left-hand value
* @param rhs right-hand value * @param rhs right-hand value
* @return this - used to chain append calls * @return this - used to chain append calls
@ -575,7 +575,7 @@ public class CompareToBuilder implements Builder<Integer> {
public CompareToBuilder append(final Object[] lhs, final Object[] rhs) { public CompareToBuilder append(final Object[] lhs, final Object[] rhs) {
return append(lhs, rhs, null); return append(lhs, rhs, null);
} }
/** /**
* <p>Appends to the <code>builder</code> the deep comparison of * <p>Appends to the <code>builder</code> the deep comparison of
* two <code>Object</code> arrays.</p> * two <code>Object</code> arrays.</p>
@ -950,7 +950,7 @@ public class CompareToBuilder implements Builder<Integer> {
* the <code>builder</code> has judged the "left-hand" side * the <code>builder</code> has judged the "left-hand" side
* as less than, greater than, or equal to the "right-hand" * as less than, greater than, or equal to the "right-hand"
* side. * side.
* *
* @return final comparison result * @return final comparison result
* @see #build() * @see #build()
*/ */
@ -963,7 +963,7 @@ public class CompareToBuilder implements Builder<Integer> {
* the <code>builder</code> has judged the "left-hand" side * the <code>builder</code> has judged the "left-hand" side
* as less than, greater than, or equal to the "right-hand" * as less than, greater than, or equal to the "right-hand"
* side. * side.
* *
* @return final comparison result as an Integer * @return final comparison result as an Integer
* @see #toComparison() * @see #toComparison()
* @since 3.0 * @since 3.0

View File

@ -85,17 +85,17 @@ import cn.hutool.core.util.ArrayUtil;
*/ */
public class HashCodeBuilder implements Builder<Integer> { public class HashCodeBuilder implements Builder<Integer> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* The default initial value to use in reflection hash code building. * The default initial value to use in reflection hash code building.
*/ */
private static final int DEFAULT_INITIAL_VALUE = 17; private static final int DEFAULT_INITIAL_VALUE = 17;
/** /**
* The default multipler value to use in reflection hash code building. * The default multipler value to use in reflection hash code building.
*/ */
private static final int DEFAULT_MULTIPLIER_VALUE = 37; private static final int DEFAULT_MULTIPLIER_VALUE = 37;
/** /**
* <p> * <p>
* A registry of objects used by reflection methods to detect cyclical object references and avoid infinite loops. * A registry of objects used by reflection methods to detect cyclical object references and avoid infinite loops.
@ -380,7 +380,7 @@ public class HashCodeBuilder implements Builder<Integer> {
* if the object is <code>null</code> * if the object is <code>null</code>
*/ */
public static int reflectionHashCode(final Object object, final boolean testTransients) { public static int reflectionHashCode(final Object object, final boolean testTransients) {
return reflectionHashCode(DEFAULT_INITIAL_VALUE, DEFAULT_MULTIPLIER_VALUE, object, return reflectionHashCode(DEFAULT_INITIAL_VALUE, DEFAULT_MULTIPLIER_VALUE, object,
testTransients, null); testTransients, null);
} }
@ -457,7 +457,7 @@ public class HashCodeBuilder implements Builder<Integer> {
* if the object is <code>null</code> * if the object is <code>null</code>
*/ */
public static int reflectionHashCode(final Object object, final String... excludeFields) { public static int reflectionHashCode(final Object object, final String... excludeFields) {
return reflectionHashCode(DEFAULT_INITIAL_VALUE, DEFAULT_MULTIPLIER_VALUE, object, false, return reflectionHashCode(DEFAULT_INITIAL_VALUE, DEFAULT_MULTIPLIER_VALUE, object, false,
null, excludeFields); null, excludeFields);
} }

View File

@ -13,13 +13,13 @@ import java.io.Serializable;
*/ */
final class IDKey implements Serializable{ final class IDKey implements Serializable{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final Object value; private final Object value;
private final int id; private final int id;
/** /**
* 构造 * 构造
* *
* @param obj 计算唯一ID的对象 * @param obj 计算唯一ID的对象
*/ */
public IDKey(final Object obj) { public IDKey(final Object obj) {
@ -32,7 +32,7 @@ final class IDKey implements Serializable{
/** /**
* returns hashcode - i.e. the system identity hashcode. * returns hashcode - i.e. the system identity hashcode.
* *
* @return the hashcode * @return the hashcode
*/ */
@Override @Override
@ -42,7 +42,7 @@ final class IDKey implements Serializable{
/** /**
* checks if instances are equal * checks if instances are equal
* *
* @param other The other object to compare to * @param other The other object to compare to
* @return if the instances are for the same object * @return if the instances are for the same object
*/ */

View File

@ -1,7 +1,7 @@
/** /**
* 建造者工具<br> * 建造者工具<br>
* 用于建造特定对象或结果 * 用于建造特定对象或结果
* *
* @author looly * @author looly
* *
*/ */

View File

@ -13,19 +13,19 @@ public class CloneRuntimeException extends RuntimeException{
public CloneRuntimeException(Throwable e) { public CloneRuntimeException(Throwable e) {
super(ExceptionUtil.getMessage(e), e); super(ExceptionUtil.getMessage(e), e);
} }
public CloneRuntimeException(String message) { public CloneRuntimeException(String message) {
super(message); super(message);
} }
public CloneRuntimeException(String messageTemplate, Object... params) { public CloneRuntimeException(String messageTemplate, Object... params) {
super(StrUtil.format(messageTemplate, params)); super(StrUtil.format(messageTemplate, params));
} }
public CloneRuntimeException(String message, Throwable throwable) { public CloneRuntimeException(String message, Throwable throwable) {
super(message, throwable); super(message, throwable);
} }
public CloneRuntimeException(Throwable throwable, String messageTemplate, Object... params) { public CloneRuntimeException(Throwable throwable, String messageTemplate, Object... params) {
super(StrUtil.format(messageTemplate, params), throwable); super(StrUtil.format(messageTemplate, params), throwable);
} }