public class ObjectUtils
extends cn.hutool.core.util.ObjectUtil
Constructor and Description |
---|
ObjectUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(Object obj1,
Object obj2)
对象比较
|
static <T> T |
toJavaBean(Object value,
Class<T> clazz)
转换值为指定 POJO 类型
|
static <T> T |
toJavaObject(Object obj,
Class<T> clazz)
Deprecated.
|
static com.alibaba.fastjson.JSONArray |
toJSONArray(Object value)
转换为 JSONArray
|
static com.alibaba.fastjson.JSONObject |
toJSONObject(Object value)
转换为 JSONObject
|
static <T> T |
toObject(Object value,
Class<T> clazz)
转换值为指定类型
|
clone, cloneByStream, cloneIfPossible, compare, compare, contains, defaultIfBlank, defaultIfEmpty, defaultIfEmpty, defaultIfNull, defaultIfNull, deserialize, emptyCount, equal, getTypeArgument, getTypeArgument, hasEmpty, hasNull, isAllEmpty, isAllNotEmpty, isBasicType, isEmpty, isNotEmpty, isNotNull, isNull, isValidIfNumber, length, notEqual, serialize, toString, unserialize
public static boolean equals(Object obj1, Object obj2)
obj1
- 对象1obj2
- 对象2public static <T> T toObject(Object value, Class<T> clazz)
T
- 泛型value
- 被转换的值clazz
- 泛型类型Convert.toObject(Object, Class)
@Deprecated public static <T> T toJavaObject(Object obj, Class<T> clazz)
toJavaBean(Object, Class)
T
- 泛型obj
- 需要转换的对象clazz
- 泛型类型public static <T> T toJavaBean(Object value, Class<T> clazz)
T
- 泛型value
- 被转换的值clazz
- 泛型类型Convert.toJavaBean(Object, Class)
public static com.alibaba.fastjson.JSONObject toJSONObject(Object value)
value
- 被转换的值Convert.toJSONObject(Object)
public static com.alibaba.fastjson.JSONArray toJSONArray(Object value)
value
- 被转换的值Convert.toJSONArray(Object)
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.