mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fix doc
This commit is contained in:
parent
52496bb62f
commit
f9fdd16c3b
@ -324,7 +324,7 @@ public class ObjectUtil {
|
||||
* @throws NullPointerException {@code defaultValueSupplier == null} 时,抛出
|
||||
* @since 5.7.20
|
||||
*/
|
||||
public static <T> T defaultIfNull(T source, Function<T , ? extends T> defaultValueSupplier) {
|
||||
public static <T> T defaultIfNull(T source, Function<T, ? extends T> defaultValueSupplier) {
|
||||
if (isNull(source)) {
|
||||
return defaultValueSupplier.apply(null);
|
||||
}
|
||||
@ -353,14 +353,15 @@ public class ObjectUtil {
|
||||
/**
|
||||
* 如果给定对象为{@code null} 返回默认值, 如果不为null 返回自定义handle处理后的返回值
|
||||
*
|
||||
* @param <T> 被检查对象为{@code null}返回默认值,否则返回自定义handle处理后的返回值
|
||||
* @param <R> 被检查的对象类型
|
||||
* @param source Object 类型对象
|
||||
* @param handle 非空时自定义的处理方法
|
||||
* @param defaultValue 默认为空的返回值
|
||||
* @param <T> 被检查对象为{@code null}返回默认值,否则返回自定义handle处理后的返回值
|
||||
* @return 处理后的返回值
|
||||
* @since 5.4.6
|
||||
*/
|
||||
public static <T,R> T defaultIfNull(R source, Function<R, ? extends T> handle, final T defaultValue) {
|
||||
public static <T, R> T defaultIfNull(R source, Function<R, ? extends T> handle, final T defaultValue) {
|
||||
if (isNotNull(source)) {
|
||||
return handle.apply(source);
|
||||
}
|
||||
|
@ -1030,8 +1030,10 @@ public class HttpRequest extends HttpBase<HttpRequest> {
|
||||
* 执行Request请求后,对响应内容后续处理<br>
|
||||
* 处理结束后关闭连接
|
||||
*
|
||||
* @param <T> 处理结果类型
|
||||
* @param function 响应内容处理函数
|
||||
* @since 5.8.5
|
||||
* @return 处理结果
|
||||
*/
|
||||
public <T> T thenFunction(Function<HttpResponse, T> function) {
|
||||
try (final HttpResponse response = execute(true)) {
|
||||
|
Loading…
Reference in New Issue
Block a user