[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-03-15 00:03:34 +00:00
parent 65d60a79fe
commit 5eedb7544b
20 changed files with 68 additions and 68 deletions

View File

@ -6,7 +6,7 @@ import cn.hutool.core.util.StrUtil;
/** /**
* 字符转换器 * 字符转换器
* *
* @author Looly * @author Looly
* *
*/ */

View File

@ -10,7 +10,7 @@ import java.util.Collection;
/** /**
* 各种集合类转换器 * 各种集合类转换器
* *
* @author Looly * @author Looly
* @since 3.0.8 * @since 3.0.8
*/ */
@ -31,7 +31,7 @@ public class CollectionConverter implements Converter<Collection<?>> {
// ---------------------------------------------------------------------------------------------- Constractor start // ---------------------------------------------------------------------------------------------- Constractor start
/** /**
* 构造 * 构造
* *
* @param collectionType 集合类型 * @param collectionType 集合类型
*/ */
public CollectionConverter(Type collectionType) { public CollectionConverter(Type collectionType) {
@ -40,7 +40,7 @@ public class CollectionConverter implements Converter<Collection<?>> {
/** /**
* 构造 * 构造
* *
* @param collectionType 集合类型 * @param collectionType 集合类型
*/ */
public CollectionConverter(Class<?> collectionType) { public CollectionConverter(Class<?> collectionType) {
@ -49,7 +49,7 @@ public class CollectionConverter implements Converter<Collection<?>> {
/** /**
* 构造 * 构造
* *
* @param collectionType 集合类型 * @param collectionType 集合类型
* @param elementType 集合元素类型 * @param elementType 集合元素类型
*/ */
@ -67,7 +67,7 @@ public class CollectionConverter implements Converter<Collection<?>> {
/** /**
* 内部转换 * 内部转换
* *
* @param value * @param value
* @return 转换后的集合对象 * @return 转换后的集合对象
*/ */

View File

@ -6,7 +6,7 @@ import cn.hutool.core.convert.AbstractConverter;
/** /**
* 货币{@link Currency} 转换器 * 货币{@link Currency} 转换器
* *
* @author Looly * @author Looly
* @since 3.0.8 * @since 3.0.8
*/ */

View File

@ -6,9 +6,9 @@ import java.time.Duration;
import java.time.temporal.TemporalAmount; import java.time.temporal.TemporalAmount;
/** /**
* *
* {@link Duration}对象转换器 * {@link Duration}对象转换器
* *
* @author Looly * @author Looly
* @since 5.0.0 * @since 5.0.0
*/ */

View File

@ -4,7 +4,7 @@ import cn.hutool.core.convert.AbstractConverter;
/** /**
* 泛型枚举转换器 * 泛型枚举转换器
* *
* @param <E> 枚举类类型 * @param <E> 枚举类类型
* @author Looly * @author Looly
* @since 4.0.2 * @since 4.0.2
@ -15,10 +15,10 @@ public class GenericEnumConverter<E extends Enum<E>> extends AbstractConverter<E
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final Class<E> enumClass; private final Class<E> enumClass;
/** /**
* 构造 * 构造
* *
* @param enumClass 转换成的目标Enum类 * @param enumClass 转换成的目标Enum类
*/ */
public GenericEnumConverter(Class<E> enumClass) { public GenericEnumConverter(Class<E> enumClass) {

View File

@ -6,10 +6,10 @@ import cn.hutool.core.convert.AbstractConverter;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
/** /**
* *
* {@link Locale}对象转换器<br> * {@link Locale}对象转换器<br>
* 只提供String转换支持 * 只提供String转换支持
* *
* @author Looly * @author Looly
* @since 4.5.2 * @since 4.5.2
*/ */

View File

@ -14,7 +14,7 @@ import java.util.Objects;
/** /**
* {@link Map} 转换器 * {@link Map} 转换器
* *
* @author Looly * @author Looly
* @since 3.0.8 * @since 3.0.8
*/ */
@ -30,7 +30,7 @@ public class MapConverter extends AbstractConverter<Map<?, ?>> {
/** /**
* 构造Map的key和value泛型类型自动获取 * 构造Map的key和value泛型类型自动获取
* *
* @param mapType Map类型 * @param mapType Map类型
*/ */
public MapConverter(Type mapType) { public MapConverter(Type mapType) {
@ -39,7 +39,7 @@ public class MapConverter extends AbstractConverter<Map<?, ?>> {
/** /**
* 构造 * 构造
* *
* @param mapType Map类型 * @param mapType Map类型
* @param keyType 键类型 * @param keyType 键类型
* @param valueType 值类型 * @param valueType 值类型
@ -77,7 +77,7 @@ public class MapConverter extends AbstractConverter<Map<?, ?>> {
/** /**
* Map转Map * Map转Map
* *
* @param srcMap 源Map * @param srcMap 源Map
* @param targetMap 目标Map * @param targetMap 目标Map
*/ */

View File

@ -5,9 +5,9 @@ import cn.hutool.core.convert.AbstractConverter;
import java.util.Optional; import java.util.Optional;
/** /**
* *
* {@link Optional}对象转换器 * {@link Optional}对象转换器
* *
* @author Looly * @author Looly
* @since 5.0.0 * @since 5.0.0
*/ */

View File

@ -22,15 +22,15 @@ public class PathConverter extends AbstractConverter<Path>{
if(value instanceof URI){ if(value instanceof URI){
return Paths.get((URI)value); return Paths.get((URI)value);
} }
if(value instanceof URL){ if(value instanceof URL){
return Paths.get(((URL)value).toURI()); return Paths.get(((URL)value).toURI());
} }
if(value instanceof File){ if(value instanceof File){
return ((File)value).toPath(); return ((File)value).toPath();
} }
return Paths.get(convertToStr(value)); return Paths.get(convertToStr(value));
} catch (Exception e) { } catch (Exception e) {
// Ignore Exception // Ignore Exception

View File

@ -6,9 +6,9 @@ import java.time.Period;
import java.time.temporal.TemporalAmount; import java.time.temporal.TemporalAmount;
/** /**
* *
* {@link Period}对象转换器 * {@link Period}对象转换器
* *
* @author Looly * @author Looly
* @since 5.0.0 * @since 5.0.0
*/ */

View File

@ -12,16 +12,16 @@ import java.lang.reflect.Type;
/** /**
* {@link Reference}转换器 * {@link Reference}转换器
* *
* @author Looly * @author Looly
* @since 3.0.8 * @since 3.0.8
*/ */
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public class ReferenceConverter extends AbstractConverter<Reference> { public class ReferenceConverter extends AbstractConverter<Reference> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final Class<? extends Reference> targetType; private final Class<? extends Reference> targetType;
/** /**
* 构造 * 构造
* @param targetType {@link Reference}实现类型 * @param targetType {@link Reference}实现类型
@ -33,7 +33,7 @@ public class ReferenceConverter extends AbstractConverter<Reference> {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
protected Reference<?> convertInternal(Object value) { protected Reference<?> convertInternal(Object value) {
//尝试将值转换为Reference泛型的类型 //尝试将值转换为Reference泛型的类型
Object targetValue = null; Object targetValue = null;
final Type paramType = TypeUtil.getTypeArgument(targetType); final Type paramType = TypeUtil.getTypeArgument(targetType);
@ -43,13 +43,13 @@ public class ReferenceConverter extends AbstractConverter<Reference> {
if(null == targetValue){ if(null == targetValue){
targetValue = value; targetValue = value;
} }
if(this.targetType == WeakReference.class){ if(this.targetType == WeakReference.class){
return new WeakReference(targetValue); return new WeakReference(targetValue);
}else if(this.targetType == SoftReference.class){ }else if(this.targetType == SoftReference.class){
return new SoftReference(targetValue); return new SoftReference(targetValue);
} }
throw new UnsupportedOperationException(StrUtil.format("Unsupport Reference type: {}", this.targetType.getName())); throw new UnsupportedOperationException(StrUtil.format("Unsupport Reference type: {}", this.targetType.getName()));
} }

View File

@ -9,7 +9,7 @@ import cn.hutool.core.util.ObjectUtil;
/** /**
* {@link StackTraceElement} 转换器<br> * {@link StackTraceElement} 转换器<br>
* 只支持Map方式转换 * 只支持Map方式转换
* *
* @author Looly * @author Looly
* @since 3.0.8 * @since 3.0.8
*/ */

View File

@ -20,7 +20,7 @@ public class URIConverter extends AbstractConverter<URI>{
if(value instanceof File){ if(value instanceof File){
return ((File)value).toURI(); return ((File)value).toURI();
} }
if(value instanceof URL){ if(value instanceof URL){
return ((URL)value).toURI(); return ((URL)value).toURI();
} }

View File

@ -20,7 +20,7 @@ public class URLConverter extends AbstractConverter<URL>{
if(value instanceof File){ if(value instanceof File){
return ((File)value).toURI().toURL(); return ((File)value).toURI().toURL();
} }
if(value instanceof URI){ if(value instanceof URI){
return ((URI)value).toURL(); return ((URI)value).toURL();
} }

View File

@ -6,7 +6,7 @@ import cn.hutool.core.convert.AbstractConverter;
/** /**
* UUID对象转换器转换器 * UUID对象转换器转换器
* *
* @author Looly * @author Looly
* @since 4.0.10 * @since 4.0.10
* *

View File

@ -1,6 +1,6 @@
/** /**
* 各种类型转换的实现类其都为Converter接口的实现用于将未知的Object类型转换为指定类型 * 各种类型转换的实现类其都为Converter接口的实现用于将未知的Object类型转换为指定类型
* *
* @author looly * @author looly
* *
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* 万能类型转换器以及各种类型转换的实现类其中Convert为转换器入口提供各种toXXX方法和convert方法 * 万能类型转换器以及各种类型转换的实现类其中Convert为转换器入口提供各种toXXX方法和convert方法
* *
* @author looly * @author looly
* *
*/ */

View File

@ -8,7 +8,7 @@ import java.util.Date;
/** /**
* 日期间隔 * 日期间隔
* *
* @author Looly * @author Looly
* *
*/ */
@ -23,7 +23,7 @@ public class DateBetween implements Serializable{
/** /**
* 创建<br> * 创建<br>
* 在前的日期做为起始时间在后的做为结束时间间隔只保留绝对值正数 * 在前的日期做为起始时间在后的做为结束时间间隔只保留绝对值正数
* *
* @param begin 起始时间 * @param begin 起始时间
* @param end 结束时间 * @param end 结束时间
* @return DateBetween * @return DateBetween
@ -36,7 +36,7 @@ public class DateBetween implements Serializable{
/** /**
* 创建<br> * 创建<br>
* 在前的日期做为起始时间在后的做为结束时间间隔只保留绝对值正数 * 在前的日期做为起始时间在后的做为结束时间间隔只保留绝对值正数
* *
* @param begin 起始时间 * @param begin 起始时间
* @param end 结束时间 * @param end 结束时间
* @param isAbs 日期间隔是否只保留绝对值正数 * @param isAbs 日期间隔是否只保留绝对值正数
@ -50,7 +50,7 @@ public class DateBetween implements Serializable{
/** /**
* 构造<br> * 构造<br>
* 在前的日期做为起始时间在后的做为结束时间间隔只保留绝对值正数 * 在前的日期做为起始时间在后的做为结束时间间隔只保留绝对值正数
* *
* @param begin 起始时间 * @param begin 起始时间
* @param end 结束时间 * @param end 结束时间
*/ */
@ -61,7 +61,7 @@ public class DateBetween implements Serializable{
/** /**
* 构造<br> * 构造<br>
* 在前的日期做为起始时间在后的做为结束时间 * 在前的日期做为起始时间在后的做为结束时间
* *
* @param begin 起始时间 * @param begin 起始时间
* @param end 结束时间 * @param end 结束时间
* @param isAbs 日期间隔是否只保留绝对值正数 * @param isAbs 日期间隔是否只保留绝对值正数
@ -70,7 +70,7 @@ public class DateBetween implements Serializable{
public DateBetween(Date begin, Date end, boolean isAbs) { public DateBetween(Date begin, Date end, boolean isAbs) {
Assert.notNull(begin, "Begin date is null !"); Assert.notNull(begin, "Begin date is null !");
Assert.notNull(end, "End date is null !"); Assert.notNull(end, "End date is null !");
if (isAbs && begin.after(end)) { if (isAbs && begin.after(end)) {
// 间隔只为正数的情况下如果开始日期晚于结束日期置换之 // 间隔只为正数的情况下如果开始日期晚于结束日期置换之
this.begin = end; this.begin = end;
@ -84,7 +84,7 @@ public class DateBetween implements Serializable{
/** /**
* 判断两个日期相差的时长<br> * 判断两个日期相差的时长<br>
* 返回 给定单位的时长差 * 返回 给定单位的时长差
* *
* @param unit 相差的单位相差 {@link DateUnit#DAY}小时{@link DateUnit#HOUR} * @param unit 相差的单位相差 {@link DateUnit#DAY}小时{@link DateUnit#HOUR}
* @return 时长差 * @return 时长差
*/ */
@ -96,7 +96,7 @@ public class DateBetween implements Serializable{
/** /**
* 计算两个日期相差月数<br> * 计算两个日期相差月数<br>
* 在非重置情况下如果起始日期的天大于结束日期的天月数要少算1不足1个月 * 在非重置情况下如果起始日期的天大于结束日期的天月数要少算1不足1个月
* *
* @param isReset 是否重置时间为起始时间重置天时分秒 * @param isReset 是否重置时间为起始时间重置天时分秒
* @return 相差月数 * @return 相差月数
* @since 3.0.8 * @since 3.0.8
@ -123,7 +123,7 @@ public class DateBetween implements Serializable{
/** /**
* 计算两个日期相差年数<br> * 计算两个日期相差年数<br>
* 在非重置情况下如果起始日期的月大于结束日期的月年数要少算1不足1年 * 在非重置情况下如果起始日期的月大于结束日期的月年数要少算1不足1年
* *
* @param isReset 是否重置时间为起始时间重置月天时分秒 * @param isReset 是否重置时间为起始时间重置月天时分秒
* @return 相差年数 * @return 相差年数
* @since 3.0.8 * @since 3.0.8
@ -155,7 +155,7 @@ public class DateBetween implements Serializable{
/** /**
* 格式化输出时间差<br> * 格式化输出时间差<br>
* *
* @param level 级别 * @param level 级别
* @return 字符串 * @return 字符串
*/ */

View File

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

View File

@ -5,7 +5,7 @@ import java.util.Calendar;
/** /**
* 日期各个部分的枚举<br> * 日期各个部分的枚举<br>
* 与Calendar相应值对应 * 与Calendar相应值对应
* *
* @author Looly * @author Looly
* *
*/ */
@ -13,91 +13,91 @@ public enum DateField {
/** /**
* 世纪 * 世纪
* *
* @see Calendar#ERA * @see Calendar#ERA
*/ */
ERA(Calendar.ERA), ERA(Calendar.ERA),
/** /**
* *
* *
* @see Calendar#YEAR * @see Calendar#YEAR
*/ */
YEAR(Calendar.YEAR), YEAR(Calendar.YEAR),
/** /**
* *
* *
* @see Calendar#MONTH * @see Calendar#MONTH
*/ */
MONTH(Calendar.MONTH), MONTH(Calendar.MONTH),
/** /**
* 一年中第几周 * 一年中第几周
* *
* @see Calendar#WEEK_OF_YEAR * @see Calendar#WEEK_OF_YEAR
*/ */
WEEK_OF_YEAR(Calendar.WEEK_OF_YEAR), WEEK_OF_YEAR(Calendar.WEEK_OF_YEAR),
/** /**
* 一月中第几周 * 一月中第几周
* *
* @see Calendar#WEEK_OF_MONTH * @see Calendar#WEEK_OF_MONTH
*/ */
WEEK_OF_MONTH(Calendar.WEEK_OF_MONTH), WEEK_OF_MONTH(Calendar.WEEK_OF_MONTH),
/** /**
* 一月中的第几天 * 一月中的第几天
* *
* @see Calendar#DAY_OF_MONTH * @see Calendar#DAY_OF_MONTH
*/ */
DAY_OF_MONTH(Calendar.DAY_OF_MONTH), DAY_OF_MONTH(Calendar.DAY_OF_MONTH),
/** /**
* 一年中的第几天 * 一年中的第几天
* *
* @see Calendar#DAY_OF_YEAR * @see Calendar#DAY_OF_YEAR
*/ */
DAY_OF_YEAR(Calendar.DAY_OF_YEAR), DAY_OF_YEAR(Calendar.DAY_OF_YEAR),
/** /**
* 周几1表示周日2表示周一 * 周几1表示周日2表示周一
* *
* @see Calendar#DAY_OF_WEEK * @see Calendar#DAY_OF_WEEK
*/ */
DAY_OF_WEEK(Calendar.DAY_OF_WEEK), DAY_OF_WEEK(Calendar.DAY_OF_WEEK),
/** /**
* 天所在的周是这个月的第几周 * 天所在的周是这个月的第几周
* *
* @see Calendar#DAY_OF_WEEK_IN_MONTH * @see Calendar#DAY_OF_WEEK_IN_MONTH
*/ */
DAY_OF_WEEK_IN_MONTH(Calendar.DAY_OF_WEEK_IN_MONTH), DAY_OF_WEEK_IN_MONTH(Calendar.DAY_OF_WEEK_IN_MONTH),
/** /**
* 上午或者下午 * 上午或者下午
* *
* @see Calendar#AM_PM * @see Calendar#AM_PM
*/ */
AM_PM(Calendar.AM_PM), AM_PM(Calendar.AM_PM),
/** /**
* 小时用于12小时制 * 小时用于12小时制
* *
* @see Calendar#HOUR * @see Calendar#HOUR
*/ */
HOUR(Calendar.HOUR), HOUR(Calendar.HOUR),
/** /**
* 小时用于24小时制 * 小时用于24小时制
* *
* @see Calendar#HOUR * @see Calendar#HOUR
*/ */
HOUR_OF_DAY(Calendar.HOUR_OF_DAY), HOUR_OF_DAY(Calendar.HOUR_OF_DAY),
/** /**
* 分钟 * 分钟
* *
* @see Calendar#MINUTE * @see Calendar#MINUTE
*/ */
MINUTE(Calendar.MINUTE), MINUTE(Calendar.MINUTE),
/** /**
* *
* *
* @see Calendar#SECOND * @see Calendar#SECOND
*/ */
SECOND(Calendar.SECOND), SECOND(Calendar.SECOND),
/** /**
* 毫秒 * 毫秒
* *
* @see Calendar#MILLISECOND * @see Calendar#MILLISECOND
*/ */
MILLISECOND(Calendar.MILLISECOND); MILLISECOND(Calendar.MILLISECOND);
@ -115,7 +115,7 @@ public enum DateField {
/** /**
* {@link Calendar}相关值转换为DatePart枚举对象<br> * {@link Calendar}相关值转换为DatePart枚举对象<br>
* *
* @param calendarPartIntValue Calendar中关于Week的int值 * @param calendarPartIntValue Calendar中关于Week的int值
* @return {@link DateField} * @return {@link DateField}
*/ */