提交 eacba7a0 编写于 作者: B Blankj

see 02/08 log

上级 e0948ffc
......@@ -113,6 +113,21 @@ public final class ObjectUtils {
return object;
}
/**
* 获取非空或默认对象
*
* @param object 对象
* @param defaultObject 默认值
* @param <T> 范型
* @return 非空或默认对象
*/
public static <T> T getOrDefault(T object, T defaultObject) {
if (object == null) {
return defaultObject;
}
return object;
}
/**
* 获取对象哈希值
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册