mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
[cleanup] erefactor/EclipseJdt - Remove trailing whitespace - All lines
EclipseJdt cleanup 'RemoveAllTrailingWhitespace' applied by erefactor. For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php For erefactor see https://github.com/cal101/erefactor
This commit is contained in:
parent
f441b319da
commit
8165442121
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 特殊异常封装,同时提供异常工具ExceptionUtil
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
|
@ -10,93 +10,93 @@ import java.math.BigInteger;
|
||||
*/
|
||||
public interface ArrayTypeGetter {
|
||||
/*-------------------------- 数组类型 start -------------------------------*/
|
||||
|
||||
|
||||
/**
|
||||
* 获取Object型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
String[] getObjs(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取String型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
String[] getStrs(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Integer型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
Integer[] getInts(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Short型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
Short[] getShorts(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Boolean型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
Boolean[] getBools(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Long型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
Long[] getLongs(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Character型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
Character[] getChars(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Double型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
Double[] getDoubles(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Byte型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
Byte[] getBytes(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigInteger型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
BigInteger[] getBigIntegers(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigDecimal型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
BigDecimal[] getBigDecimals(String key);
|
||||
/*-------------------------- 数组类型 end -------------------------------*/
|
||||
/*-------------------------- 数组类型 end -------------------------------*/
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import java.util.Date;
|
||||
/**
|
||||
* 基本类型的getter接口<br>
|
||||
* 提供一个统一的接口定义返回不同类型的值(基本类型)<br>
|
||||
*
|
||||
*
|
||||
* @author Looly
|
||||
*/
|
||||
public interface BasicTypeGetter<K> {
|
||||
@ -15,7 +15,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取Object属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -23,7 +23,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取字符串型属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -31,7 +31,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取int型属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -39,7 +39,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取short型属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -47,7 +47,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取boolean型属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -55,7 +55,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取long型属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -63,7 +63,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取char型属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -71,7 +71,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取float型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -79,7 +79,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取double型属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -87,7 +87,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取byte型属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -95,7 +95,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取BigDecimal型属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -103,7 +103,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取BigInteger型属性值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -111,7 +111,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获得Enum类型的值
|
||||
*
|
||||
*
|
||||
* @param <E> 枚举类型
|
||||
* @param clazz Enum的Class
|
||||
* @param key KEY
|
||||
@ -121,7 +121,7 @@ public interface BasicTypeGetter<K> {
|
||||
|
||||
/**
|
||||
* 获取Date类型值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return Date类型属性值
|
||||
*/
|
||||
|
@ -12,88 +12,88 @@ public interface GroupedTypeGetter {
|
||||
/*-------------------------- 基本类型 start -------------------------------*/
|
||||
/**
|
||||
* 获取字符串型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param group 分组
|
||||
* @return 属性值
|
||||
*/
|
||||
String getStrByGroup(String key, String group);
|
||||
|
||||
|
||||
/**
|
||||
* 获取int型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param group 分组
|
||||
* @return 属性值
|
||||
*/
|
||||
Integer getIntByGroup(String key, String group);
|
||||
|
||||
|
||||
/**
|
||||
* 获取short型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param group 分组
|
||||
* @return 属性值
|
||||
*/
|
||||
Short getShortByGroup(String key, String group);
|
||||
|
||||
|
||||
/**
|
||||
* 获取boolean型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param group 分组
|
||||
* @return 属性值
|
||||
*/
|
||||
Boolean getBoolByGroup(String key, String group);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Long型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param group 分组
|
||||
* @return 属性值
|
||||
*/
|
||||
Long getLongByGroup(String key, String group);
|
||||
|
||||
|
||||
/**
|
||||
* 获取char型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param group 分组
|
||||
* @return 属性值
|
||||
*/
|
||||
Character getCharByGroup(String key, String group);
|
||||
|
||||
|
||||
/**
|
||||
* 获取double型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param group 分组
|
||||
* @return 属性值
|
||||
*/
|
||||
Double getDoubleByGroup(String key, String group);
|
||||
|
||||
|
||||
/**
|
||||
* 获取byte型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param group 分组
|
||||
* @return 属性值
|
||||
*/
|
||||
Byte getByteByGroup(String key, String group);
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigDecimal型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param group 分组
|
||||
* @return 属性值
|
||||
*/
|
||||
BigDecimal getBigDecimalByGroup(String key, String group);
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigInteger型属性值<br>
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param group 分组
|
||||
* @return 属性值
|
||||
|
@ -13,7 +13,7 @@ public interface ListTypeGetter {
|
||||
/*-------------------------- List类型 start -------------------------------*/
|
||||
/**
|
||||
* 获取Object型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
@ -21,79 +21,79 @@ public interface ListTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取String型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
List<String> getStrList(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Integer型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
List<Integer> getIntList(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Short型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
List<Short> getShortList(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Boolean型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
List<Boolean> getBoolList(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigDecimal型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
List<Long> getLongList(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Character型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
List<Character> getCharList(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Double型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
List<Double> getDoubleList(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Byte型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
List<Byte> getByteList(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigDecimal型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
List<BigDecimal> getBigDecimalList(String key);
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigInteger型属性值列表
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值列表
|
||||
*/
|
||||
|
@ -7,7 +7,7 @@ import java.math.BigInteger;
|
||||
* 可选默认值的数组类型的Get接口
|
||||
* 提供一个统一的接口定义返回不同类型的值(基本类型)<br>
|
||||
* 如果值不存在或获取错误,返回默认值
|
||||
*
|
||||
*
|
||||
* @author Looly
|
||||
* @since 4.0.2
|
||||
*
|
||||
@ -17,7 +17,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取Object型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
@ -26,7 +26,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取String型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
@ -35,7 +35,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取Integer型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
@ -44,7 +44,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取Short型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
@ -53,7 +53,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取Boolean型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
@ -62,7 +62,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取Long型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
@ -71,7 +71,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取Character型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
@ -80,7 +80,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取Double型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
@ -89,7 +89,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取Byte型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
@ -98,7 +98,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取BigInteger型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
@ -107,7 +107,7 @@ public interface OptArrayTypeGetter {
|
||||
|
||||
/**
|
||||
* 获取BigDecimal型属性值数组
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认数组值
|
||||
* @return 属性值列表
|
||||
|
@ -12,7 +12,7 @@ import java.util.Date;
|
||||
*/
|
||||
public interface OptBasicTypeGetter<K> {
|
||||
/*-------------------------- 基本类型 start -------------------------------*/
|
||||
|
||||
|
||||
/**
|
||||
* 获取Object属性值
|
||||
* @param key 属性名
|
||||
@ -20,120 +20,120 @@ public interface OptBasicTypeGetter<K> {
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
Object getObj(K key, Object defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取字符串型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
String getStr(K key, String defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取int型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
Integer getInt(K key, Integer defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取short型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
Short getShort(K key, Short defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取boolean型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
Boolean getBool(K key, Boolean defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Long型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
Long getLong(K key, Long defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取char型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
Character getChar(K key, Character defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取float型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
Float getFloat(K key, Float defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取double型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
Double getDouble(K key, Double defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取byte型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
Byte getByte(K key, Byte defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigDecimal型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
BigDecimal getBigDecimal(K key, BigDecimal defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigInteger型属性值<br>
|
||||
* 若获得的值为不可见字符,使用默认值
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @param defaultValue 默认值
|
||||
* @return 属性值,无对应值返回defaultValue
|
||||
*/
|
||||
BigInteger getBigInteger(K key, BigInteger defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获得Enum类型的值
|
||||
*
|
||||
*
|
||||
* @param <E> 枚举类型
|
||||
* @param clazz Enum的Class
|
||||
* @param key KEY
|
||||
@ -141,7 +141,7 @@ public interface OptBasicTypeGetter<K> {
|
||||
* @return Enum类型的值,无则返回Null
|
||||
*/
|
||||
<E extends Enum<E>> E getEnum(Class<E> clazz, K key, E defaultValue);
|
||||
|
||||
|
||||
/**
|
||||
* 获取Date类型值
|
||||
* @param key 属性名
|
||||
|
@ -16,11 +16,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default Object getObj(K key) {
|
||||
return getObj(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取字符串型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -28,11 +28,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default String getStr(K key){
|
||||
return this.getStr(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取int型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -40,11 +40,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default Integer getInt(K key) {
|
||||
return this.getInt(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取short型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -52,11 +52,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default Short getShort(K key){
|
||||
return this.getShort(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取boolean型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -64,11 +64,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default Boolean getBool(K key){
|
||||
return this.getBool(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取long型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -76,11 +76,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default Long getLong(K key){
|
||||
return this.getLong(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取char型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -88,11 +88,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default Character getChar(K key){
|
||||
return this.getChar(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取float型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -100,11 +100,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default Float getFloat(K key){
|
||||
return this.getFloat(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取double型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -116,7 +116,7 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
/**
|
||||
* 获取byte型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -124,11 +124,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default Byte getByte(K key){
|
||||
return this.getByte(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigDecimal型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -136,11 +136,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default BigDecimal getBigDecimal(K key){
|
||||
return this.getBigDecimal(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取BigInteger型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
@ -148,11 +148,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default BigInteger getBigInteger(K key){
|
||||
return this.getBigInteger(key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取Enum型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param clazz Enum 的 Class
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
@ -161,11 +161,11 @@ public interface OptNullBasicTypeGetter<K> extends BasicTypeGetter<K>, OptBasicT
|
||||
default <E extends Enum<E>> E getEnum(Class<E> clazz, K key) {
|
||||
return this.getEnum(clazz, key, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取Date型属性值<br>
|
||||
* 无值或获取错误返回null
|
||||
*
|
||||
*
|
||||
* @param key 属性名
|
||||
* @return 属性值
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* getXXX方法的接口和抽象实现
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
|
@ -4,7 +4,7 @@ import java.awt.Image;
|
||||
|
||||
/**
|
||||
* 图片缩略算法类型
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
* @since 4.5.8
|
||||
*/
|
||||
@ -23,7 +23,7 @@ public enum ScaleType {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param value 缩放方式
|
||||
* @see Image#SCALE_DEFAULT
|
||||
* @see Image#SCALE_FAST
|
||||
|
@ -125,7 +125,7 @@ class LZWEncoder {
|
||||
pixAry = pixels;
|
||||
initCodeSize = Math.max(2, color_depth);
|
||||
}
|
||||
|
||||
|
||||
// Add a character to the end of the current packet, and if it is 254
|
||||
// characters, flush the packet to disk.
|
||||
void char_out(byte c, OutputStream outs) throws IOException {
|
||||
@ -133,7 +133,7 @@ class LZWEncoder {
|
||||
if (a_count >= 254)
|
||||
flush_char(outs);
|
||||
}
|
||||
|
||||
|
||||
// Clear out the hash table
|
||||
|
||||
// table clear for block compress
|
||||
@ -144,13 +144,13 @@ class LZWEncoder {
|
||||
|
||||
output(ClearCode, outs);
|
||||
}
|
||||
|
||||
|
||||
// reset code table
|
||||
void cl_hash(int hsize) {
|
||||
for (int i = 0; i < hsize; ++i)
|
||||
htab[i] = -1;
|
||||
}
|
||||
|
||||
|
||||
void compress(int init_bits, OutputStream outs) throws IOException {
|
||||
int fcode;
|
||||
int i /* = 0 */;
|
||||
@ -220,7 +220,7 @@ class LZWEncoder {
|
||||
output(ent, outs);
|
||||
output(EOFCode, outs);
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void encode(OutputStream os) throws IOException {
|
||||
os.write(initCodeSize); // write "initial code size" byte
|
||||
@ -232,7 +232,7 @@ class LZWEncoder {
|
||||
|
||||
os.write(0); // write block terminator
|
||||
}
|
||||
|
||||
|
||||
// Flush the packet to disk, and reset the accumulator
|
||||
void flush_char(OutputStream outs) throws IOException {
|
||||
if (a_count > 0) {
|
||||
@ -241,11 +241,11 @@ class LZWEncoder {
|
||||
a_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final int MAXCODE(int n_bits) {
|
||||
return (1 << n_bits) - 1;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Return the next pixel from the image
|
||||
//----------------------------------------------------------------------------
|
||||
@ -259,7 +259,7 @@ class LZWEncoder {
|
||||
|
||||
return pix & 0xff;
|
||||
}
|
||||
|
||||
|
||||
void output(int code, OutputStream outs) throws IOException {
|
||||
cur_accum &= masks[cur_bits];
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* GIF处理,来自:https://github.com/rtyley/animated-gif-lib-for-java
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 图像处理相关工具类封装
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
|
@ -28,7 +28,7 @@ public class FastByteArrayOutputStream extends OutputStream {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
*
|
||||
* @param size 预估大小
|
||||
*/
|
||||
public FastByteArrayOutputStream(int size) {
|
||||
@ -80,7 +80,7 @@ public class FastByteArrayOutputStream extends OutputStream {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 转为Byte数组
|
||||
* @return Byte数组
|
||||
@ -102,7 +102,7 @@ public class FastByteArrayOutputStream extends OutputStream {
|
||||
public String toString(String charsetName) {
|
||||
return toString(CharsetUtil.charset(charsetName));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 转为字符串
|
||||
* @param charset 编码,null表示默认编码
|
||||
|
@ -49,7 +49,7 @@ public class FastByteBuffer {
|
||||
|
||||
/**
|
||||
* 分配下一个缓冲区,不会小于1024
|
||||
*
|
||||
*
|
||||
* @param newSize 理想缓冲区字节数
|
||||
*/
|
||||
private void needNewBuffer(int newSize) {
|
||||
@ -73,7 +73,7 @@ public class FastByteBuffer {
|
||||
|
||||
/**
|
||||
* 向快速缓冲加入数据
|
||||
*
|
||||
*
|
||||
* @param array 数据
|
||||
* @param off 偏移量
|
||||
* @param len 字节数
|
||||
@ -117,9 +117,9 @@ public class FastByteBuffer {
|
||||
|
||||
/**
|
||||
* 向快速缓冲加入数据
|
||||
*
|
||||
*
|
||||
* @param array 数据
|
||||
*
|
||||
*
|
||||
* @return 快速缓冲自身 @see FastByteBuffer
|
||||
*/
|
||||
public FastByteBuffer append(byte[] array) {
|
||||
@ -128,7 +128,7 @@ public class FastByteBuffer {
|
||||
|
||||
/**
|
||||
* 向快速缓冲加入一个字节
|
||||
*
|
||||
*
|
||||
* @param element 一个字节的数据
|
||||
* @return 快速缓冲自身 @see FastByteBuffer
|
||||
*/
|
||||
@ -146,7 +146,7 @@ public class FastByteBuffer {
|
||||
|
||||
/**
|
||||
* 将另一个快速缓冲加入到自身
|
||||
*
|
||||
*
|
||||
* @param buff 快速缓冲
|
||||
* @return 快速缓冲自身 @see FastByteBuffer
|
||||
*/
|
||||
@ -171,7 +171,7 @@ public class FastByteBuffer {
|
||||
|
||||
/**
|
||||
* 当前缓冲位于缓冲区的索引位
|
||||
*
|
||||
*
|
||||
* @return {@link #currentBufferIndex}
|
||||
*/
|
||||
public int index() {
|
||||
@ -184,7 +184,7 @@ public class FastByteBuffer {
|
||||
|
||||
/**
|
||||
* 根据索引位返回缓冲集中的缓冲
|
||||
*
|
||||
*
|
||||
* @param index 索引位
|
||||
* @return 缓冲
|
||||
*/
|
||||
@ -202,7 +202,7 @@ public class FastByteBuffer {
|
||||
|
||||
/**
|
||||
* 返回快速缓冲中的数据
|
||||
*
|
||||
*
|
||||
* @return 快速缓冲中的数据
|
||||
*/
|
||||
public byte[] toArray() {
|
||||
@ -226,7 +226,7 @@ public class FastByteBuffer {
|
||||
|
||||
/**
|
||||
* 返回快速缓冲中的数据
|
||||
*
|
||||
*
|
||||
* @param start 逻辑起始位置
|
||||
* @param len 逻辑字节长
|
||||
* @return 快速缓冲中的数据
|
||||
@ -263,7 +263,7 @@ public class FastByteBuffer {
|
||||
|
||||
/**
|
||||
* 根据索引位返回一个字节
|
||||
*
|
||||
*
|
||||
* @param index 索引位
|
||||
* @return 一个字节
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* IO运行时异常,常用于对IOException的包装
|
||||
*
|
||||
*
|
||||
* @author xiaoleilu
|
||||
*/
|
||||
public class IORuntimeException extends RuntimeException {
|
||||
@ -33,7 +33,7 @@ public class IORuntimeException extends RuntimeException {
|
||||
|
||||
/**
|
||||
* 导致这个异常的异常是否是指定类型的异常
|
||||
*
|
||||
*
|
||||
* @param clazz 异常类
|
||||
* @return 是否为指定类型异常
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@ import java.io.OutputStream;
|
||||
/**
|
||||
* 此OutputStream写出数据到<b>/dev/null</b>,即忽略所有数据<br>
|
||||
* 来自 Apache Commons io
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
* @since 4.0.6
|
||||
*/
|
||||
@ -19,7 +19,7 @@ public class NullOutputStream extends OutputStream {
|
||||
|
||||
/**
|
||||
* 什么也不做,写出到<code>/dev/null</code>.
|
||||
*
|
||||
*
|
||||
* @param b 写出的数据
|
||||
* @param off 开始位置
|
||||
* @param len 长度
|
||||
@ -31,7 +31,7 @@ public class NullOutputStream extends OutputStream {
|
||||
|
||||
/**
|
||||
* 什么也不做,写出到 <code>/dev/null</code>.
|
||||
*
|
||||
*
|
||||
* @param b 写出的数据
|
||||
*/
|
||||
@Override
|
||||
@ -41,7 +41,7 @@ public class NullOutputStream extends OutputStream {
|
||||
|
||||
/**
|
||||
* 什么也不做,写出到 <code>/dev/null</code>.
|
||||
*
|
||||
*
|
||||
* @param b 写出的数据
|
||||
* @throws IOException 不抛出
|
||||
*/
|
||||
|
@ -6,18 +6,18 @@ package cn.hutool.core.io;
|
||||
*
|
||||
*/
|
||||
public interface StreamProgress {
|
||||
|
||||
|
||||
/**
|
||||
* 开始
|
||||
*/
|
||||
void start();
|
||||
|
||||
|
||||
/**
|
||||
* 进行中
|
||||
* @param progressSize 已经进行的大小
|
||||
*/
|
||||
void progress(long progressSize);
|
||||
|
||||
|
||||
/**
|
||||
* 结束
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* CRC16相关算法封装为Checksum
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* IO校验相关库和工具
|
||||
*
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user