Merge pull request #1448 from cal101/jdt-RemoveAllTrailingWhitespaceCleanUp-3

[cleanup] erefactor/EclipseJdt - Remove trailing whitespace - All lines
This commit is contained in:
Golden Looly 2021-02-28 12:18:26 +08:00 committed by GitHub
commit 64a3da1e83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 98 additions and 98 deletions

View File

@ -7,7 +7,7 @@ package cn.hutool.core.clone;
* @param <T> 继承类的类型
*/
public class CloneSupport<T> implements Cloneable<T>{
@SuppressWarnings("unchecked")
@Override
public T clone() {
@ -17,5 +17,5 @@ public class CloneSupport<T> implements Cloneable<T>{
throw new CloneRuntimeException(e);
}
}
}

View File

@ -7,7 +7,7 @@ package cn.hutool.core.clone;
* @param <T> 实现克隆接口的类型
*/
public interface Cloneable<T> extends java.lang.Cloneable{
/**
* 克隆当前对象浅复制
* @return 克隆后的对象

View File

@ -1,6 +1,6 @@
/**
* 克隆封装
*
*
* @author looly
*
*/

View File

@ -10,7 +10,7 @@ import cn.hutool.core.lang.Assert;
*
*/
public class BCD {
/**
* 字符串转BCD码
* @param asc ASCII字符串
@ -53,7 +53,7 @@ public class BCD {
}
return bbt;
}
/**
* ASCII转BCD
* @param ascii ASCII byte数组
@ -100,8 +100,8 @@ public class BCD {
}
return new String(temp);
}
//----------------------------------------------------------------- Private method start
/**
* 转换单个byte为BCD

View File

@ -14,7 +14,7 @@ import cn.hutool.core.util.StrUtil;
*
*/
public class Base32 {
private Base32() {}
private static final String BASE32_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
@ -73,10 +73,10 @@ public class Base32 {
return base32.toString();
}
/**
* base32编码
*
*
* @param source 被编码的base32字符串
* @return 被加密后的字符串
*/
@ -86,7 +86,7 @@ public class Base32 {
/**
* base32编码
*
*
* @param source 被编码的base32字符串
* @param charset 字符集
* @return 被加密后的字符串
@ -97,7 +97,7 @@ public class Base32 {
/**
* base32编码
*
*
* @param source 被编码的base32字符串
* @param charset 字符集
* @return 被加密后的字符串
@ -155,10 +155,10 @@ public class Base32 {
}
return bytes;
}
/**
* base32解码
*
*
* @param source 被解码的base32字符串
* @return 被加密后的字符串
*/
@ -168,7 +168,7 @@ public class Base32 {
/**
* base32解码
*
*
* @param source 被解码的base32字符串
* @param charset 字符集
* @return 被加密后的字符串
@ -176,10 +176,10 @@ public class Base32 {
public static String decodeStr(String source, String charset) {
return StrUtil.str(decode(source), charset);
}
/**
* base32解码
*
*
* @param source 被解码的base32字符串
* @param charset 字符集
* @return 被加密后的字符串

View File

@ -12,7 +12,7 @@ import cn.hutool.core.util.StrUtil;
/**
* Base62工具类提供Base62的编码和解码方案<br>
*
*
* @author Looly
* @since 4.5.9
*/
@ -24,7 +24,7 @@ public class Base62 {
// -------------------------------------------------------------------- encode
/**
* Base62编码
*
*
* @param source 被编码的Base62字符串
* @return 被加密后的字符串
*/
@ -34,7 +34,7 @@ public class Base62 {
/**
* Base62编码
*
*
* @param source 被编码的Base62字符串
* @param charset 字符集
* @return 被加密后的字符串
@ -45,7 +45,7 @@ public class Base62 {
/**
* Base62编码
*
*
* @param source 被编码的Base62字符串
* @return 被加密后的字符串
*/
@ -55,7 +55,7 @@ public class Base62 {
/**
* Base62编码
*
*
* @param in 被编码Base62的流一般为图片流或者文件流
* @return 被加密后的字符串
*/
@ -65,7 +65,7 @@ public class Base62 {
/**
* Base62编码
*
*
* @param file 被编码Base62的文件
* @return 被加密后的字符串
*/
@ -76,7 +76,7 @@ public class Base62 {
// -------------------------------------------------------------------- decode
/**
* Base62解码
*
*
* @param source 被解码的Base62字符串
* @return 被加密后的字符串
*/
@ -86,7 +86,7 @@ public class Base62 {
/**
* Base62解码
*
*
* @param source 被解码的Base62字符串
* @return 被加密后的字符串
*/
@ -96,7 +96,7 @@ public class Base62 {
/**
* Base62解码
*
*
* @param source 被解码的Base62字符串
* @param charset 字符集
* @return 被加密后的字符串
@ -107,7 +107,7 @@ public class Base62 {
/**
* Base62解码
*
*
* @param Base62 被解码的Base62字符串
* @param destFile 目标文件
* @return 目标文件
@ -118,7 +118,7 @@ public class Base62 {
/**
* Base62解码
*
*
* @param base62Str 被解码的Base62字符串
* @param out 写出到的流
* @param isCloseOut 是否关闭输出流
@ -129,7 +129,7 @@ public class Base62 {
/**
* Base62解码
*
*
* @param base62Str 被解码的Base62字符串
* @return 被加密后的字符串
*/
@ -139,7 +139,7 @@ public class Base62 {
/**
* 解码Base62
*
*
* @param base62bytes Base62输入
* @return 解码后的bytes
*/

View File

@ -48,16 +48,16 @@ public class Base62Codec implements Serializable{
/**
* 创建GMP风格的Base62编码解码器对象
*
*
* @return Base62Codec
*/
public static Base62Codec createGmp() {
return new Base62Codec(GMP);
}
/**
* 创建Inverted风格的Base62编码解码器对象
*
*
* @return Base62Codec
*/
public static Base62Codec createInverted() {
@ -69,7 +69,7 @@ public class Base62Codec implements Serializable{
/**
* 构造
*
*
* @param alphabet 自定义字母表
*/
public Base62Codec(byte[] alphabet) {
@ -93,7 +93,7 @@ public class Base62Codec implements Serializable{
/**
* 解码Base62消息
*
*
* @param encoded Base62内容
* @return 消息
*/
@ -105,7 +105,7 @@ public class Base62Codec implements Serializable{
// --------------------------------------------------------------------------------------------------------------- Private method start
/**
* 按照字典转换bytes
*
*
* @param indices 内容
* @param dictionary 字典
* @return 转换值
@ -122,7 +122,7 @@ public class Base62Codec implements Serializable{
/**
* 使用定义的字母表从源基准到目标基准
*
*
* @param message 消息bytes
* @param sourceBase 源基准长度
* @param targetBase 目标基准长度
@ -167,7 +167,7 @@ public class Base62Codec implements Serializable{
/**
* 估算结果长度
*
*
* @param inputLength 输入长度
* @param sourceBase 源基准长度
* @param targetBase 目标基准长度

View File

@ -8,7 +8,7 @@ import cn.hutool.core.util.StrUtil;
/**
* Base64解码实现
*
*
* @author looly
*
*/
@ -41,7 +41,7 @@ public class Base64Decoder {
/**
* base64解码
*
*
* @param source 被解码的base64字符串
* @return 被加密后的字符串
*/
@ -51,7 +51,7 @@ public class Base64Decoder {
/**
* base64解码
*
*
* @param source 被解码的base64字符串
* @param charset 字符集
* @return 被加密后的字符串
@ -62,7 +62,7 @@ public class Base64Decoder {
/**
* base64解码
*
*
* @param source 被解码的base64字符串
* @return 被加密后的字符串
*/
@ -72,7 +72,7 @@ public class Base64Decoder {
/**
* 解码Base64
*
*
* @param in 输入
* @return 解码后的bytes
*/
@ -85,7 +85,7 @@ public class Base64Decoder {
/**
* 解码Base64
*
*
* @param in 输入
* @param pos 开始位置
* @param length 长度
@ -133,7 +133,7 @@ public class Base64Decoder {
// ----------------------------------------------------------------------------------------------- Private start
/**
* 获取下一个有效的byte字符
*
*
* @param in 输入
* @param pos 当前位置调用此方法后此位置保持在有效字符的下一个位置
* @param maxPos 最大位置
@ -157,7 +157,7 @@ public class Base64Decoder {
/**
* int包装使之可变
*
*
* @author looly
*
*/

View File

@ -7,7 +7,7 @@ import java.nio.charset.Charset;
/**
* Base64编码
*
*
* @author looly
* @since 3.2.0
*/
@ -40,7 +40,7 @@ public class Base64Encoder {
// -------------------------------------------------------------------- encode
/**
* 编码为Base64非URL安全的
*
*
* @param arr 被编码的数组
* @param lineSep 在76个char之后是CRLF还是EOF
* @return 编码后的bytes
@ -51,7 +51,7 @@ public class Base64Encoder {
/**
* 编码为Base64URL安全的
*
*
* @param arr 被编码的数组
* @param lineSep 在76个char之后是CRLF还是EOF
* @return 编码后的bytes
@ -63,7 +63,7 @@ public class Base64Encoder {
/**
* base64编码
*
*
* @param source 被编码的base64字符串
* @return 被加密后的字符串
*/
@ -73,7 +73,7 @@ public class Base64Encoder {
/**
* base64编码URL安全
*
*
* @param source 被编码的base64字符串
* @return 被加密后的字符串
* @since 3.0.6
@ -84,7 +84,7 @@ public class Base64Encoder {
/**
* base64编码
*
*
* @param source 被编码的base64字符串
* @param charset 字符集
* @return 被加密后的字符串
@ -95,7 +95,7 @@ public class Base64Encoder {
/**
* base64编码URL安全的
*
*
* @param source 被编码的base64字符串
* @param charset 字符集
* @return 被加密后的字符串
@ -107,7 +107,7 @@ public class Base64Encoder {
/**
* base64编码
*
*
* @param source 被编码的base64字符串
* @return 被加密后的字符串
*/
@ -117,7 +117,7 @@ public class Base64Encoder {
/**
* base64编码,URL安全的
*
*
* @param source 被编码的base64字符串
* @return 被加密后的字符串
* @since 3.0.6
@ -129,7 +129,7 @@ public class Base64Encoder {
/**
* 编码为Base64<br>
* 如果isMultiLine为{@code true}则每76个字符一个换行符否则在一行显示
*
*
* @param arr 被编码的数组
* @param isMultiLine 在76个char之后是CRLF还是EOF
* @param isUrlSafe 是否使用URL安全字符一般为{@code false}

View File

@ -11,7 +11,7 @@ import cn.hutool.core.util.StrUtil;
/**
* 莫尔斯电码的编码和解码实现<br>
* 参考https://github.com/TakWolf/Java-MorseCoder
*
*
* @author looly, TakWolf
* @since 4.4.1
*/
@ -22,7 +22,7 @@ public class Morse {
/**
* 注册莫尔斯电码表
*
*
* @param abc 字母和字符
* @param dict 二进制
*/
@ -104,7 +104,7 @@ public class Morse {
/**
* 构造
*
*
* @param dit 点表示的字符
* @param dah 横线表示的字符
* @param split 分隔符
@ -117,13 +117,13 @@ public class Morse {
/**
* 编码
*
*
* @param text 文本
* @return 密文
*/
public String encode(String text) {
Assert.notNull(text, "Text should not be null.");
text = text.toUpperCase();
final StringBuilder morseBuilder = new StringBuilder();
final int len = text.codePointCount(0, text.length());
@ -140,7 +140,7 @@ public class Morse {
/**
* 解码
*
*
* @param morse 莫尔斯电码
* @return 明文
*/

View File

@ -3,7 +3,7 @@ package cn.hutool.core.codec;
/**
* RotNrotate by N places回转N位密码是一种简易的替换式密码也是过去在古罗马开发的凯撒加密的一种变体<br>
* 代码来自https://github.com/orclight/jencrypt
*
*
* @author looly,shuzhilong
* @since 4.4.1
*/
@ -18,7 +18,7 @@ public class Rot {
/**
* Rot-13编码同时编码数字
*
*
* @param message 被编码的消息
* @return 编码后的字符串
*/
@ -28,7 +28,7 @@ public class Rot {
/**
* Rot-13编码
*
*
* @param message 被编码的消息
* @param isEnocdeNumber 是否编码数字
* @return 编码后的字符串
@ -39,7 +39,7 @@ public class Rot {
/**
* RotN编码
*
*
* @param message 被编码的消息
* @param offset 位移常用位移13
* @param isEnocdeNumber 是否编码数字
@ -57,7 +57,7 @@ public class Rot {
/**
* Rot-13解码同时解码数字
*
*
* @param rot 被解码的消息密文
* @return 解码后的字符串
*/
@ -67,7 +67,7 @@ public class Rot {
/**
* Rot-13解码
*
*
* @param rot 被解码的消息密文
* @param isDecodeNumber 是否解码数字
* @return 解码后的字符串
@ -78,7 +78,7 @@ public class Rot {
/**
* RotN解码
*
*
* @param rot 被解码的消息密文
* @param offset 位移常用位移13
* @param isDecodeNumber 是否解码数字
@ -97,7 +97,7 @@ public class Rot {
// ------------------------------------------------------------------------------------------ Private method start
/**
* 解码字符
*
*
* @param c 字符
* @param offset 位移
* @param isDecodeNumber 是否解码数字
@ -129,7 +129,7 @@ public class Rot {
/**
* 编码字符
*
*
* @param c 字符
* @param offset 位移
* @param isDecodeNumber 是否编码数字

View File

@ -1,6 +1,6 @@
/**
* BaseN以及BCD编码封装
*
*
* @author looly
*
*/

View File

@ -58,7 +58,7 @@ public class ArrayIter<E> implements Iterator<E>, Iterable<E>, Serializable{
if(endIndex > 0 && endIndex < this.endIndex){
this.endIndex = endIndex;
}
if(startIndex >=0 && startIndex < this.endIndex){
this.startIndex = startIndex;
}

View File

@ -15,15 +15,15 @@ import java.util.PriorityQueue;
*/
public class BoundedPriorityQueue<E> extends PriorityQueue<E>{
private static final long serialVersionUID = 3794348988671694820L;
//容量
private final int capacity;
private final Comparator<? super E> comparator;
public BoundedPriorityQueue(int capacity) {
this(capacity, null);
}
/**
* 构造
* @param capacity 容量
@ -63,7 +63,7 @@ public class BoundedPriorityQueue<E> extends PriorityQueue<E>{
}
return super.offer(e);
}
/**
* 添加多个元素<br>
* 参数为集合的情况请使用{@link PriorityQueue#addAll}
@ -73,7 +73,7 @@ public class BoundedPriorityQueue<E> extends PriorityQueue<E>{
public boolean addAll(E[] c) {
return this.addAll(Arrays.asList(c));
}
/**
* @return 返回排序后的列表
*/
@ -82,7 +82,7 @@ public class BoundedPriorityQueue<E> extends PriorityQueue<E>{
list.sort(comparator);
return list;
}
@Override
public Iterator<E> iterator() {
return toList().iterator();

View File

@ -2,7 +2,7 @@ package cn.hutool.core.collection;
/**
* 集合相关工具类包括数组{@link CollUtil} 的别名工具类类
*
*
* @author xiaoleilu
* @see CollUtil
*/

View File

@ -7,7 +7,7 @@ import java.util.concurrent.ConcurrentHashMap;
/**
* 通过{@link ConcurrentHashMap}实现的线程安全HashSet
*
*
* @author Looly
*
* @param <E> 元素类型
@ -32,7 +32,7 @@ public class ConcurrentHashSet<E> extends AbstractSet<E> implements java.io.Seri
/**
* 构造<br>
* 触发因子为默认的0.75
*
*
* @param initialCapacity 初始大小
*/
public ConcurrentHashSet(int initialCapacity) {
@ -41,7 +41,7 @@ public class ConcurrentHashSet<E> extends AbstractSet<E> implements java.io.Seri
/**
* 构造
*
*
* @param initialCapacity 初始大小
* @param loadFactor 加载因子此参数决定数据增长时触发的百分比
*/
@ -51,7 +51,7 @@ public class ConcurrentHashSet<E> extends AbstractSet<E> implements java.io.Seri
/**
* 构造
*
*
* @param initialCapacity 初始大小
* @param loadFactor 触发因子此参数决定数据增长时触发的百分比
* @param concurrencyLevel 线程并发度
@ -59,7 +59,7 @@ public class ConcurrentHashSet<E> extends AbstractSet<E> implements java.io.Seri
public ConcurrentHashSet(int initialCapacity, float loadFactor, int concurrencyLevel) {
map = new ConcurrentHashMap<>(initialCapacity, loadFactor, concurrencyLevel);
}
/**
* 从已有集合中构造
* @param iter {@link Iterable}

View File

@ -8,14 +8,14 @@ import java.util.List;
* 复制 {@link Iterator}<br>
* 为了解决并发情况下{@link Iterator}遍历导致的问题当Iterator被修改会抛出ConcurrentModificationException
* 故使用复制原Iterator的方式解决此问题
*
*
* <p>
* 解决方法为在构造方法中遍历Iterator中的元素装入新的List中然后遍历之
* 当然修改这个复制后的Iterator是没有意义的因此remove方法将会抛出异常
*
*
* <p>
* 需要注意的是在构造此对象时需要保证原子性原对象不被修改最好加锁构造此对象构造完毕后解锁
*
*
*
* @param <E> 元素类型
* @author Looly
@ -25,7 +25,7 @@ public class CopiedIter<E> implements Iterator<E>, Iterable<E>, Serializable {
private static final long serialVersionUID = 1L;
private final Iterator<E> listIterator;
public static <V> CopiedIter<V> copyOf(Iterator<V> iterator){
return new CopiedIter<>(iterator);
}

View File

@ -13,9 +13,9 @@ import java.util.Iterator;
*/
public class EnumerationIter<E> implements Iterator<E>, Iterable<E>, Serializable{
private static final long serialVersionUID = 1L;
private final Enumeration<E> e;
/**
* 构造
* @param enumeration {@link Enumeration}对象

View File

@ -13,9 +13,9 @@ import java.util.Iterator;
*/
public class IteratorEnumeration<E> implements Enumeration<E>, Serializable{
private static final long serialVersionUID = 1L;
private final Iterator<E> iterator;
/**
* 构造
* @param iterator {@link Iterator}对象

View File

@ -17,7 +17,7 @@ import cn.hutool.core.lang.Assert;
/**
* 将Reader包装为一个按照行读取的Iterator<br>
* 此对象遍历结束后应关闭之推荐使用方式:
*
*
* <pre>
* LineIterator it = null;
* try {
@ -30,7 +30,7 @@ import cn.hutool.core.lang.Assert;
* it.close();
* }
* </pre>
*
*
* 此类来自于Apache Commons io
*
* @author looly
@ -45,7 +45,7 @@ public class LineIter implements Iterator<String>, Iterable<String>, Closeable,
private String cachedLine;
/** A flag indicating if the iterator has been fully read. */
private boolean finished = false;
/**
* 构造
*
@ -148,7 +148,7 @@ public class LineIter implements Iterator<String>, Iterable<String>, Closeable,
/**
* 重写此方法来判断是否每一行都被返回默认全部为true
*
*
* @param line 需要验证的行
* @return 是否通过验证
*/