Merge pull request #1476 from cal101/jdt-RemoveAllTrailingWhitespaceCleanUp-1

[cleanup] erefactor/EclipseJdt - Remove trailing whitespace - All lines
This commit is contained in:
Golden Looly 2021-03-16 13:18:29 +08:00 committed by GitHub
commit bc20dfd293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 55 additions and 55 deletions

View File

@ -1,6 +1,6 @@
/**
* 集合以及Iterator封装包括集合工具CollUtilIterator和Iterable工具IterUtil
*
*
* @author looly
*
*/

View File

@ -5,7 +5,7 @@ import java.util.Comparator;
/**
* 针对 {@link Comparable}对象的默认比较器
*
*
* @param <E> 比较对象类型
* @author Looly
* @since 3.0.7
@ -25,7 +25,7 @@ public class ComparableComparator<E extends Comparable<? super E>> implements Co
/**
* 比较两个{@link Comparable}对象
*
*
* <pre>
* obj1.compareTo(obj2)
* </pre>

View File

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

View File

@ -12,7 +12,7 @@ import cn.hutool.core.util.StrUtil;
/**
* Bean字段排序器<br>
* 参阅feilong-core中的PropertyComparator
*
*
* @author Looly
*
* @param <T> 被比较的Bean
@ -24,7 +24,7 @@ public class FieldComparator<T> implements Comparator<T>, Serializable {
/**
* 构造
*
*
* @param beanClass Bean类
* @param fieldName 字段名
*/

View File

@ -7,7 +7,7 @@ import java.util.Locale;
/**
* 按照GBK拼音顺序对给定的汉字字符串排序
*
*
* @author looly
* @since 4.0.8
*/

View File

@ -9,20 +9,20 @@ import java.util.Comparator;
/**
* Bean属性排序器<br>
* 支持读取Bean多层次下的属性
*
*
* @author Looly
*
* @param <T> 被比较的Bean
*/
public class PropertyComparator<T> implements Comparator<T>, Serializable {
private static final long serialVersionUID = 9157326766723846313L;
private final String property;
private final boolean isNullGreater;
/**
* 构造
*
*
* @param property 属性名
*/
public PropertyComparator(String property) {
@ -31,7 +31,7 @@ public class PropertyComparator<T> implements Comparator<T>, Serializable {
/**
* 构造
*
*
* @param property 属性名
* @param isNullGreater null值是否排在后从小到大排序
*/

View File

@ -5,7 +5,7 @@ import java.util.Comparator;
/**
* 反转比较器
*
*
* @author Looly
*
* @param <E> 被比较对象类型

View File

@ -14,7 +14,7 @@ import java.util.List;
* 排序时版本从小到大排序即比较时小版本在前大版本在后<br>
* 支持如1.3.20.86.82.201601018.5a/8.5c等版本形式<br>
* 参考https://www.cnblogs.com/shihaiming/p/6286575.html
*
*
* @author Looly
* @since 4.0.2
*/
@ -44,7 +44,7 @@ public class VersionComparator implements Comparator<String>, Serializable {
* compare("1.13.0", "1.12.1c") &gt; 0
* compare("V0.0.20170102", "V0.0.20170101") &gt; 0
* </pre>
*
*
* @param version1 版本1
* @param version2 版本2
*/

View File

@ -1,6 +1,6 @@
/**
* 各种比较器Comparator实现和封装
*
*
* @author looly
*
*/

View File

@ -11,17 +11,17 @@ import java.util.Map;
/**
* 抽象转换器提供通用的转换逻辑同时通过convertInternal实现对应类型的专属逻辑<br>
* 转换器不会抛出转换异常转换失败时会返回{@code null}
*
*
* @author Looly
*
*/
public abstract class AbstractConverter<T> implements Converter<T>, Serializable {
private static final long serialVersionUID = 1L;
/**
* 不抛异常转换<br>
* 当转换失败时返回默认值
*
*
* @param value 被转换的值
* @param defaultValue 默认值
* @return 转换后的值
@ -66,12 +66,12 @@ public abstract class AbstractConverter<T> implements Converter<T>, Serializable
/**
* 内部转换器 {@link AbstractConverter#convert(Object, Object)} 调用实现基本转换逻辑<br>
* 内部转换器转换后如果转换失败可以做如下操作处理结果都为返回默认值
*
*
* <pre>
* 1返回{@code null}
* 1返回{@code null}
* 2抛出一个{@link RuntimeException}异常
* </pre>
*
*
* @param value
* @return 转换后的类型
*/
@ -80,13 +80,13 @@ public abstract class AbstractConverter<T> implements Converter<T>, Serializable
/**
* 值转为String用于内部转换中需要使用String中转的情况<br>
* 转换规则为
*
*
* <pre>
* 1字符串类型将被强转
* 2数组将被转换为逗号分隔的字符串
* 3其它类型将调用默认的toString()方法
* </pre>
*
*
* @param value
* @return String
*/
@ -107,7 +107,7 @@ public abstract class AbstractConverter<T> implements Converter<T>, Serializable
/**
* 获得此类实现类的泛型类型
*
*
* @return 此类的泛型类型可能为{@code null}
*/
@SuppressWarnings("unchecked")

View File

@ -10,12 +10,12 @@ import java.util.concurrent.ConcurrentHashMap;
*/
public enum BasicType {
BYTE, SHORT, INT, INTEGER, LONG, DOUBLE, FLOAT, BOOLEAN, CHAR, CHARACTER, STRING;
/** 包装类型为Key原始类型为Value例如 Integer.class =》 int.class. */
public static final Map<Class<?>, Class<?>> WRAPPER_PRIMITIVE_MAP = new ConcurrentHashMap<>(8);
/** 原始类型为Key包装类型为Value例如 int.class =》 Integer.class. */
public static final Map<Class<?>, Class<?>> PRIMITIVE_WRAPPER_MAP = new ConcurrentHashMap<>(8);
static {
WRAPPER_PRIMITIVE_MAP.put(Boolean.class, boolean.class);
WRAPPER_PRIMITIVE_MAP.put(Byte.class, byte.class);
@ -30,7 +30,7 @@ public enum BasicType {
PRIMITIVE_WRAPPER_MAP.put(entry.getValue(), entry.getKey());
}
}
/**
* 原始类转为包装类非原始类返回原类
* @param clazz 原始类
@ -43,7 +43,7 @@ public enum BasicType {
Class<?> result = PRIMITIVE_WRAPPER_MAP.get(clazz);
return (null == result) ? clazz : result;
}
/**
* 包装类转为原始类非包装类返回原类
* @param clazz 包装类

View File

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

View File

@ -2,7 +2,7 @@ package cn.hutool.core.convert;
/**
* 转换器接口实现类型转换
*
*
* @param <T> 转换到的目标类型
* @author Looly
*/
@ -11,7 +11,7 @@ public interface Converter<T> {
/**
* 转换为指定类型<br>
* 如果类型无法确定将读取默认值的类型做为目标类型
*
*
* @param value 原始值
* @param defaultValue 默认值
* @return 转换后的值

View File

@ -7,7 +7,7 @@ import cn.hutool.core.util.BooleanUtil;
/**
* {@link AtomicBoolean}转换器
*
*
* @author Looly
* @since 3.0.8
*/

View File

@ -7,7 +7,7 @@ import java.util.concurrent.atomic.AtomicIntegerArray;
/**
* {@link AtomicIntegerArray}转换器
*
*
* @author Looly
* @since 5.4.5
*/

View File

@ -7,7 +7,7 @@ import java.util.concurrent.atomic.AtomicLongArray;
/**
* {@link AtomicLongArray}转换器
*
*
* @author Looly
* @since 5.4.5
*/

View File

@ -9,17 +9,17 @@ import cn.hutool.core.util.TypeUtil;
/**
* {@link AtomicReference}转换器
*
*
* @author Looly
* @since 3.0.8
*/
@SuppressWarnings("rawtypes")
public class AtomicReferenceConverter extends AbstractConverter<AtomicReference> {
private static final long serialVersionUID = 1L;
@Override
protected AtomicReference<?> convertInternal(Object value) {
//尝试将值转换为Reference泛型的类型
Object targetValue = null;
final Type paramType = TypeUtil.getTypeArgument(AtomicReference.class);
@ -29,7 +29,7 @@ public class AtomicReferenceConverter extends AbstractConverter<AtomicReference>
if(null == targetValue){
targetValue = value;
}
return new AtomicReference<>(targetValue);
}

View File

@ -21,7 +21,7 @@ import java.util.Map;
* Bean = Bean
* ValueProvider = Bean
* </pre>
*
*
* @param <T> Bean类型
* @author Looly
* @since 4.0.2
@ -32,10 +32,10 @@ public class BeanConverter<T> extends AbstractConverter<T> {
private final Type beanType;
private final Class<T> beanClass;
private final CopyOptions copyOptions;
/**
* 构造默认转换选项注入失败的字段忽略
*
*
* @param beanType 转换成的目标Bean类型
*/
public BeanConverter(Type beanType) {
@ -44,16 +44,16 @@ public class BeanConverter<T> extends AbstractConverter<T> {
/**
* 构造默认转换选项注入失败的字段忽略
*
*
* @param beanClass 转换成的目标Bean类
*/
public BeanConverter(Class<T> beanClass) {
this(beanClass, CopyOptions.create().setIgnoreError(true));
}
/**
* 构造
*
*
* @param beanType 转换成的目标Bean类
* @param copyOptions Bean转换选项参数
*/

View File

@ -9,7 +9,7 @@ import cn.hutool.core.util.StrUtil;
/**
* 日期转换器
*
*
* @author Looly
*
*/
@ -21,7 +21,7 @@ public class CalendarConverter extends AbstractConverter<Calendar> {
/**
* 获取日期格式
*
*
* @return 设置日期格式
*/
public String getFormat() {
@ -30,7 +30,7 @@ public class CalendarConverter extends AbstractConverter<Calendar> {
/**
* 设置日期格式
*
*
* @param format 日期格式
*/
public void setFormat(String format) {

View File

@ -5,7 +5,7 @@ import cn.hutool.core.convert.ConvertException;
/**
* 强转转换器
*
*
* @author Looly
* @param <T> 强制转换到的类型
* @since 4.0.2