public class ObjectTools extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getOrDefault(T value,
T defaultValue)
如果不为空则返回, 为空则返回默认值
|
static String |
getOrDefaultString(String value)
如果字符串不为空白则返回, 为空白则返回空白
|
static String |
getOrDefaultString(String value,
String defaultValue)
如果字符串不为空白则返回, 为空白则返回默认值
|
public static <T> T getOrDefault(T value,
T defaultValue)
T - 类型参数value - 值defaultValue - 默认值public static String getOrDefaultString(String value, String defaultValue)
value - 值defaultValue - 默认值Copyright © 2022. All rights reserved.