mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix doc
This commit is contained in:
parent
fcb12d19e1
commit
ff38207bbe
@ -2560,13 +2560,13 @@ public class CollUtil {
|
|||||||
/**
|
/**
|
||||||
* 一个对象不为空且不存在于该集合中时,加入到该集合中<br>
|
* 一个对象不为空且不存在于该集合中时,加入到该集合中<br>
|
||||||
* <pre>
|
* <pre>
|
||||||
* null, null => false
|
* null, null -> false
|
||||||
* [], null => false
|
* [], null -> false
|
||||||
* null, "123" => false
|
* null, "123" -> false
|
||||||
* ["123"], "123" => false
|
* ["123"], "123" -> false
|
||||||
* [], "123" => true
|
* [], "123" -> true
|
||||||
* ["456"], "123" => true
|
* ["456"], "123" -> true
|
||||||
* [Animal{"name": "jack"}], Dog{"name": "jack"} => true
|
* [Animal{"name": "jack"}], Dog{"name": "jack"} -> true
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @param collection 被加入的集合
|
* @param collection 被加入的集合
|
||||||
@ -2576,7 +2576,7 @@ public class CollUtil {
|
|||||||
* @return 是否添加成功
|
* @return 是否添加成功
|
||||||
* @author Cloud-Style
|
* @author Cloud-Style
|
||||||
*/
|
*/
|
||||||
public static <T, S extends T> boolean addIfAbsent(Collection<T> collection, S object) {
|
public static <T, S extends T> boolean addIfAbsent(final Collection<T> collection, final S object) {
|
||||||
if (object == null || collection == null || collection.contains(object)) {
|
if (object == null || collection == null || collection.contains(object)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,7 @@ public class CharSequenceUtil extends StrChecker {
|
|||||||
/**
|
/**
|
||||||
* 当给定字符串为空字符串时,转换为{@code null}
|
* 当给定字符串为空字符串时,转换为{@code null}
|
||||||
*
|
*
|
||||||
|
* @param <T> 字符串类型
|
||||||
* @param str 被转换的字符串
|
* @param str 被转换的字符串
|
||||||
* @return 转换后的字符串
|
* @return 转换后的字符串
|
||||||
*/
|
*/
|
||||||
@ -129,6 +130,7 @@ public class CharSequenceUtil extends StrChecker {
|
|||||||
* @param handler 非blank的处理方法
|
* @param handler 非blank的处理方法
|
||||||
* @param defaultSupplier 默认值提供者
|
* @param defaultSupplier 默认值提供者
|
||||||
* @param <T> 对象类型(必须实现CharSequence接口)
|
* @param <T> 对象类型(必须实现CharSequence接口)
|
||||||
|
* @param <V> 结果类型
|
||||||
* @return 被检查对象为{@code null}返回默认值,否则返回自定义handle处理后的返回值
|
* @return 被检查对象为{@code null}返回默认值,否则返回自定义handle处理后的返回值
|
||||||
* @throws NullPointerException {@code defaultValueSupplier == null} 时,抛出
|
* @throws NullPointerException {@code defaultValueSupplier == null} 时,抛出
|
||||||
* @since 5.7.20
|
* @since 5.7.20
|
||||||
|
Loading…
x
Reference in New Issue
Block a user