This commit is contained in:
Looly
2020-12-02 04:37:06 +08:00
parent 77e6759d9a
commit 61f58a9b62
36 changed files with 132 additions and 126 deletions

View File

@@ -66,7 +66,7 @@ public class BeanPath implements Serializable{
* </pre>
*
* @param expression 表达式
* @return {@link BeanPath}
* @return BeanPath
*/
public static BeanPath create(String expression) {
return new BeanPath(expression);

View File

@@ -1,10 +1,10 @@
package cn.hutool.core.codec;
import cn.hutool.core.util.ArrayUtil;
import java.io.ByteArrayOutputStream;
import java.io.Serializable;
import cn.hutool.core.util.ArrayUtil;
/**
* Base62编码解码实现常用于短URL<br>
* From https://github.com/seruco/base62
@@ -49,7 +49,7 @@ public class Base62Codec implements Serializable{
/**
* 创建GMP风格的Base62编码解码器对象
*
* @return {@link Base62Codec}
* @return Base62Codec
*/
public static Base62Codec createGmp() {
return new Base62Codec(GMP);
@@ -58,7 +58,7 @@ public class Base62Codec implements Serializable{
/**
* 创建Inverted风格的Base62编码解码器对象
*
* @return {@link Base62Codec}
* @return Base62Codec
*/
public static Base62Codec createInverted() {
return new Base62Codec(INVERTED);

View File

@@ -9,6 +9,7 @@ package cn.hutool.core.date;
*/
@Deprecated
public class BetweenFormater extends BetweenFormatter {
private static final long serialVersionUID = 1L;
public BetweenFormater(long betweenMs, Level level) {
super(betweenMs, level);

View File

@@ -61,25 +61,17 @@ public class SystemClock {
public static final SystemClock INSTANCE = new SystemClock(1);
}
/**
* 单例实例
* @return 单例实例
*/
private static SystemClock instance() {
return InstanceHolder.INSTANCE;
}
/**
* @return 当前时间
*/
public static long now() {
return instance().currentTimeMillis();
return InstanceHolder.INSTANCE.currentTimeMillis();
}
/**
* @return 当前时间字符串表现形式
*/
public static String nowDate() {
return new Timestamp(instance().currentTimeMillis()).toString();
return new Timestamp(InstanceHolder.INSTANCE.currentTimeMillis()).toString();
}
}

View File

@@ -50,20 +50,20 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
// -----------------------------------------------------------------------
/**
* 获得 {@link FastDateFormat} 实例,使用默认格式和地区
* 获得 FastDateFormat实例使用默认格式和地区
*
* @return {@link FastDateFormat}
* @return FastDateFormat
*/
public static FastDateFormat getInstance() {
return CACHE.getInstance();
}
/**
* 获得 {@link FastDateFormat} 实例,使用默认地区<br>
* 获得 FastDateFormat 实例,使用默认地区<br>
* 支持缓存
*
* @param pattern 使用{@link java.text.SimpleDateFormat} 相同的日期格式
* @return {@link FastDateFormat}
* @return FastDateFormat
* @throws IllegalArgumentException 日期格式问题
*/
public static FastDateFormat getInstance(final String pattern) {
@@ -71,12 +71,12 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param pattern 使用{@link java.text.SimpleDateFormat} 相同的日期格式
* @param timeZone 时区{@link TimeZone}
* @return {@link FastDateFormat}
* @return FastDateFormat
* @throws IllegalArgumentException 日期格式问题
*/
public static FastDateFormat getInstance(final String pattern, final TimeZone timeZone) {
@@ -84,12 +84,12 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param pattern 使用{@link java.text.SimpleDateFormat} 相同的日期格式
* @param locale {@link Locale} 日期地理位置
* @return {@link FastDateFormat}
* @return FastDateFormat
* @throws IllegalArgumentException 日期格式问题
*/
public static FastDateFormat getInstance(final String pattern, final Locale locale) {
@@ -97,13 +97,13 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param pattern 使用{@link java.text.SimpleDateFormat} 相同的日期格式
* @param timeZone 时区{@link TimeZone}
* @param locale {@link Locale} 日期地理位置
* @return {@link FastDateFormat}
* @return FastDateFormat
* @throws IllegalArgumentException 日期格式问题
*/
public static FastDateFormat getInstance(final String pattern, final TimeZone timeZone, final Locale locale) {
@@ -112,48 +112,48 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
// -----------------------------------------------------------------------
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param style date style: FULL, LONG, MEDIUM, or SHORT
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getDateInstance(final int style) {
return CACHE.getDateInstance(style, null, null);
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param style date style: FULL, LONG, MEDIUM, or SHORT
* @param locale {@link Locale} 日期地理位置
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getDateInstance(final int style, final Locale locale) {
return CACHE.getDateInstance(style, null, locale);
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param style date style: FULL, LONG, MEDIUM, or SHORT
* @param timeZone 时区{@link TimeZone}
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getDateInstance(final int style, final TimeZone timeZone) {
return CACHE.getDateInstance(style, timeZone, null);
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param style date style: FULL, LONG, MEDIUM, or SHORT
* @param timeZone 时区{@link TimeZone}
* @param locale {@link Locale} 日期地理位置
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getDateInstance(final int style, final TimeZone timeZone, final Locale locale) {
return CACHE.getDateInstance(style, timeZone, locale);
@@ -161,48 +161,48 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
// -----------------------------------------------------------------------
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param style time style: FULL, LONG, MEDIUM, or SHORT
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getTimeInstance(final int style) {
return CACHE.getTimeInstance(style, null, null);
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param style time style: FULL, LONG, MEDIUM, or SHORT
* @param locale {@link Locale} 日期地理位置
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getTimeInstance(final int style, final Locale locale) {
return CACHE.getTimeInstance(style, null, locale);
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param style time style: FULL, LONG, MEDIUM, or SHORT
* @param timeZone optional time zone, overrides time zone of formatted time
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getTimeInstance(final int style, final TimeZone timeZone) {
return CACHE.getTimeInstance(style, timeZone, null);
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param style time style: FULL, LONG, MEDIUM, or SHORT
* @param timeZone optional time zone, overrides time zone of formatted time
* @param locale {@link Locale} 日期地理位置
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getTimeInstance(final int style, final TimeZone timeZone, final Locale locale) {
return CACHE.getTimeInstance(style, timeZone, locale);
@@ -210,52 +210,52 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
// -----------------------------------------------------------------------
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT
* @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle) {
return CACHE.getDateTimeInstance(dateStyle, timeStyle, null, null);
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT
* @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT
* @param locale {@link Locale} 日期地理位置
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final Locale locale) {
return CACHE.getDateTimeInstance(dateStyle, timeStyle, null, locale);
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT
* @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT
* @param timeZone 时区{@link TimeZone}
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final TimeZone timeZone) {
return getDateTimeInstance(dateStyle, timeStyle, timeZone, null);
}
/**
* 获得 {@link FastDateFormat} 实例<br>
* 获得 FastDateFormat 实例<br>
* 支持缓存
*
* @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT
* @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT
* @param timeZone 时区{@link TimeZone}
* @param locale {@link Locale} 日期地理位置
* @return 本地化 {@link FastDateFormat}
* @return 本地化 FastDateFormat
*/
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final TimeZone timeZone, final Locale locale) {
return CACHE.getDateTimeInstance(dateStyle, timeStyle, timeZone, locale);

View File

@@ -767,12 +767,11 @@ public class FileUtil extends PathUtil {
final File[] files = directory.listFiles();
if (ArrayUtil.isEmpty(files)) {
// 空文件夹则删除之
//noinspection ResultOfMethodCallIgnored
directory.delete();
} else {
for (File childFile : files) {
cleanEmpty(childFile);
}
return directory.delete();
}
for (File childFile : files) {
cleanEmpty(childFile);
}
return true;
}
@@ -1666,7 +1665,7 @@ public class FileUtil extends PathUtil {
* </pre>
*
* @param file 文件 {@link File}
* @return 类型,文件的扩展名,未找到为<code>null</code>
* @return 类型,文件的扩展名,未找到为{@code null}
* @throws IORuntimeException IO异常
* @see FileTypeUtil#getType(File)
*/

View File

@@ -3,6 +3,7 @@ package cn.hutool.core.io.checksum;
import cn.hutool.core.io.checksum.crc16.CRC16Checksum;
import cn.hutool.core.io.checksum.crc16.CRC16IBM;
import java.io.Serializable;
import java.util.zip.Checksum;
/**
@@ -11,7 +12,7 @@ import java.util.zip.Checksum;
* @author looly
* @since 4.4.1
*/
public class CRC16 implements Checksum {
public class CRC16 implements Checksum, Serializable {
private static final long serialVersionUID = 1L;
private final CRC16Checksum crc16;

View File

@@ -7,6 +7,7 @@ package cn.hutool.core.io.checksum.crc16;
* @since 5.3.10
*/
public class CRC16Ansi extends CRC16Checksum{
private static final long serialVersionUID = 1L;
private static final int WC_POLY = 0xa001;

View File

@@ -8,6 +8,7 @@ package cn.hutool.core.io.checksum.crc16;
* @since 5.3.10
*/
public class CRC16CCITT extends CRC16Checksum{
private static final long serialVersionUID = 1L;
private static final int WC_POLY = 0x8408;

View File

@@ -7,6 +7,7 @@ package cn.hutool.core.io.checksum.crc16;
* @since 5.3.10
*/
public class CRC16CCITTFalse extends CRC16Checksum{
private static final long serialVersionUID = 1L;
private static final int WC_POLY = 0x1021;

View File

@@ -8,6 +8,7 @@ package cn.hutool.core.io.checksum.crc16;
* @since 5.3.10
*/
public class CRC16DNP extends CRC16Checksum{
private static final long serialVersionUID = 1L;
private static final int WC_POLY = 0xA6BC;

View File

@@ -8,6 +8,7 @@ package cn.hutool.core.io.checksum.crc16;
* @since 5.3.10
*/
public class CRC16IBM extends CRC16Checksum{
private static final long serialVersionUID = 1L;
private static final int WC_POLY = 0xa001;

View File

@@ -8,6 +8,7 @@ package cn.hutool.core.io.checksum.crc16;
* @since 5.3.10
*/
public class CRC16Maxim extends CRC16Checksum{
private static final long serialVersionUID = 1L;
private static final int WC_POLY = 0xa001;

View File

@@ -9,6 +9,7 @@ package cn.hutool.core.io.checksum.crc16;
* @since 5.3.10
*/
public class CRC16Modbus extends CRC16Checksum{
private static final long serialVersionUID = 1L;
private static final int WC_POLY = 0xa001;

View File

@@ -8,6 +8,7 @@ package cn.hutool.core.io.checksum.crc16;
* @since 5.3.10
*/
public class CRC16USB extends CRC16Checksum{
private static final long serialVersionUID = 1L;
private static final int WC_POLY = 0xa001;

View File

@@ -8,6 +8,7 @@ package cn.hutool.core.io.checksum.crc16;
* @since 5.3.10
*/
public class CRC16X25 extends CRC16Checksum{
private static final long serialVersionUID = 1L;
private static final int WC_POLY = 0x8408;

View File

@@ -8,6 +8,7 @@ package cn.hutool.core.io.checksum.crc16;
* @since 5.3.10
*/
public class CRC16XModem extends CRC16Checksum{
private static final long serialVersionUID = 1L;
// 0001 0000 0010 0001 (0, 5, 12)
private static final int WC_POLY = 0x1021;

View File

@@ -92,7 +92,7 @@ public class Validator {
public final static Pattern PLATE_NUMBER = PatternPool.PLATE_NUMBER;
/**
* 给定值是否为<code>true</code>
* 给定值是否为{@code true}
*
* @param value 值
* @return 是否为<code>true</code>
@@ -103,7 +103,7 @@ public class Validator {
}
/**
* 给定值是否不为<code>false</code>
* 给定值是否不为{@code false}
*
* @param value 值
* @return 是否不为<code>false</code>
@@ -114,7 +114,7 @@ public class Validator {
}
/**
* 检查指定值是否为<code>true</code>
* 检查指定值是否为{@code true}
*
* @param value 值
* @param errorMsgTemplate 错误消息内容模板(变量使用{}表示)
@@ -131,7 +131,7 @@ public class Validator {
}
/**
* 检查指定值是否为<code>false</code>
* 检查指定值是否为{@code false}
*
* @param value 值
* @param errorMsgTemplate 错误消息内容模板(变量使用{}表示)
@@ -148,7 +148,7 @@ public class Validator {
}
/**
* 给定值是否为<code>null</code>
* 给定值是否为{@code null}
*
* @param value 值
* @return 是否为<code>null</code>
@@ -158,7 +158,7 @@ public class Validator {
}
/**
* 给定值是否不为<code>null</code>
* 给定值是否不为{@code null}
*
* @param value 值
* @return 是否不为<code>null</code>
@@ -168,7 +168,7 @@ public class Validator {
}
/**
* 检查指定值是否为<code>null</code>
* 检查指定值是否为{@code null}
*
* @param <T> 被检查的对象类型
* @param value 值
@@ -186,7 +186,7 @@ public class Validator {
}
/**
* 检查指定值是否非<code>null</code>
* 检查指定值是否非{@code null}
*
* @param <T> 被检查的对象类型
* @param value 值

View File

@@ -13,6 +13,7 @@ import java.util.Map;
* @since 5.2.6
*/
public class BiMap<K, V> extends MapWrapper<K, V> {
private static final long serialVersionUID = 1L;
private Map<V, K> inverse;

View File

@@ -296,7 +296,7 @@ public class NetUtil {
* 获取指定名称的网卡信息
*
* @param name 网络接口名例如Linux下默认是eth0
* @return 网卡,未找到返回<code>null</code>
* @return 网卡,未找到返回{@code null}
* @since 5.0.7
*/
public static NetworkInterface getNetworkInterface(String name) {
@@ -321,7 +321,7 @@ public class NetUtil {
/**
* 获取本机所有网卡
*
* @return 所有网卡,异常返回<code>null</code>
* @return 所有网卡,异常返回{@code null}
* @since 3.0.1
*/
public static Collection<NetworkInterface> getNetworkInterfaces() {
@@ -425,11 +425,11 @@ public class NetUtil {
/**
* 获取本机网卡IP地址这个地址为所有网卡中非回路地址的第一个<br>
* 如果获取失败调用 {@link InetAddress#getLocalHost()}方法获取。<br>
* 此方法不会抛出异常,获取失败将返回<code>null</code><br>
* 此方法不会抛出异常,获取失败将返回{@code null}<br>
* <p>
* 参考http://stackoverflow.com/questions/9481865/getting-the-ip-address-of-the-current-machine-using-java
*
* @return 本机网卡IP地址获取失败返回<code>null</code>
* @return 本机网卡IP地址获取失败返回{@code null}
* @since 3.0.7
*/
public static String getLocalhostStr() {
@@ -448,11 +448,11 @@ public class NetUtil {
* 2. 如果无满足要求的地址,调用 {@link InetAddress#getLocalHost()} 获取地址
* </pre>
* <p>
* 此方法不会抛出异常,获取失败将返回<code>null</code><br>
* 此方法不会抛出异常,获取失败将返回{@code null}<br>
* <p>
* 见https://github.com/looly/hutool/issues/428
*
* @return 本机网卡IP地址获取失败返回<code>null</code>
* @return 本机网卡IP地址获取失败返回{@code null}
* @since 3.0.1
*/
public static InetAddress getLocalhost() {
@@ -674,6 +674,7 @@ public class NetUtil {
* @since 4.4.1
* @deprecated 拼写错误,请使用{@link #isUnknown(String)}
*/
@Deprecated
public static boolean isUnknow(String checkString) {
return isUnknown(checkString);
}

View File

@@ -1765,7 +1765,7 @@ public class ArrayUtil extends PrimitiveArrayUtil {
// O(n)时间复杂度检查数组是否有序
/**
* 检查数组是否有序即comparator.compare(array[i], array[i + 1]) <= 0若传入空数组或空比较器则返回false
* 检查数组是否有序即comparator.compare(array[i], array[i + 1]) &lt;= 0若传入空数组或空比较器则返回false
*
* @param array 数组
* @param comparator 比较器
@@ -1788,7 +1788,7 @@ public class ArrayUtil extends PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i].compareTo(array[i + 1]) <= 0若传入空数组则返回false
* 检查数组是否升序即array[i].compareTo(array[i + 1]) &lt;= 0若传入空数组则返回false
*
* @param <T> 数组元素类型该类型需要实现Comparable接口
* @param array 数组
@@ -1802,7 +1802,7 @@ public class ArrayUtil extends PrimitiveArrayUtil {
/**
* 检查数组是否升序即array[i].compareTo(array[i + 1]) <= 0若传入空数组则返回false
* 检查数组是否升序即array[i].compareTo(array[i + 1]) &lt;= 0若传入空数组则返回false
*
* @param <T> 数组元素类型该类型需要实现Comparable接口
* @param array 数组
@@ -1825,7 +1825,7 @@ public class ArrayUtil extends PrimitiveArrayUtil {
}
/**
* 检查数组是否降序即array[i].compareTo(array[i + 1]) >= 0若传入空数组则返回false
* 检查数组是否降序即array[i].compareTo(array[i + 1]) &gt;= 0若传入空数组则返回false
*
* @param <T> 数组元素类型该类型需要实现Comparable接口
* @param array 数组

View File

@@ -3005,7 +3005,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3017,7 +3017,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3039,7 +3039,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否降序即array[i] >= array[i+1]若传入空数组则返回false
* 检查数组是否降序即array[i] &gt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否降序
@@ -3061,7 +3061,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3073,7 +3073,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3095,7 +3095,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否降序即array[i] >= array[i+1]若传入空数组则返回false
* 检查数组是否降序即array[i] &gt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否降序
@@ -3117,7 +3117,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3129,7 +3129,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3151,7 +3151,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否降序即array[i] >= array[i+1]若传入空数组则返回false
* 检查数组是否降序即array[i] &gt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否降序
@@ -3173,7 +3173,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3185,7 +3185,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3207,7 +3207,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否降序即array[i] >= array[i+1]若传入空数组则返回false
* 检查数组是否降序即array[i] &gt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否降序
@@ -3229,7 +3229,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3241,7 +3241,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3263,7 +3263,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否降序即array[i] >= array[i+1]若传入空数组则返回false
* 检查数组是否降序即array[i] &gt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否降序
@@ -3285,7 +3285,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3297,7 +3297,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3319,7 +3319,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否降序即array[i] >= array[i+1]若传入空数组则返回false
* 检查数组是否降序即array[i] &gt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否降序
@@ -3341,7 +3341,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3353,7 +3353,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否升序即array[i] <= array[i+1]若传入空数组则返回false
* 检查数组是否升序即array[i] &lt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否升序
@@ -3375,7 +3375,7 @@ public class PrimitiveArrayUtil {
}
/**
* 检查数组是否降序即array[i] >= array[i+1]若传入空数组则返回false
* 检查数组是否降序即array[i] &gt;= array[i+1]若传入空数组则返回false
*
* @param array 数组
* @return 数组是否降序

View File

@@ -51,6 +51,6 @@ public class VersionComparatorTest {
public void equalsTest(){
VersionComparator first = new VersionComparator();
VersionComparator other = new VersionComparator();
Assert.assertFalse(first.equals(other));
Assert.assertNotEquals(first, other);
}
}