public final class ObjectUtils extends Object
| 构造器和说明 |
|---|
ObjectUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> void |
applyIfNotNull(T obj,
Consumer<T> consumer) |
static <T> T |
cast(Object value,
Class<T> type)
Returns target type value from origin value cast
See com.alibaba.fastjson.util.TypeUtils#castToInt(Object)
|
static Object |
getValue(Object obj,
String name)
Gets the target's name value
|
static boolean |
isEmpty(Object o)
判断对象是否为空
|
public static boolean isEmpty(Object o)
o - the objecttrue is emptypublic static Object getValue(Object obj, String name)
obj - the objectname - the field namepublic static <T> T cast(Object value, Class<T> type)
See com.alibaba.fastjson.util.TypeUtils#castToInt(Object)
value - source objecttype - target object typepublic static <T> void applyIfNotNull(T obj,
Consumer<T> consumer)
Copyright © 2025. All rights reserved.