mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
修复拼写错误
This commit is contained in:
parent
300fe3b6fd
commit
f2249f449e
@ -893,12 +893,12 @@ public class BeanUtil {
|
|||||||
* 判断Bean是否为非空对象,非空对象表示本身不为{@code null}或者含有非{@code null}属性的对象
|
* 判断Bean是否为非空对象,非空对象表示本身不为{@code null}或者含有非{@code null}属性的对象
|
||||||
*
|
*
|
||||||
* @param bean Bean对象
|
* @param bean Bean对象
|
||||||
* @param ignoreFiledNames 忽略检查的字段名
|
* @param ignoreFieldNames 忽略检查的字段名
|
||||||
* @return 是否为非空,{@code true} - 非空 / {@code false} - 空
|
* @return 是否为非空,{@code true} - 非空 / {@code false} - 空
|
||||||
* @since 5.0.7
|
* @since 5.0.7
|
||||||
*/
|
*/
|
||||||
public static boolean isNotEmpty(Object bean, String... ignoreFiledNames) {
|
public static boolean isNotEmpty(Object bean, String... ignoreFieldNames) {
|
||||||
return false == isEmpty(bean, ignoreFiledNames);
|
return false == isEmpty(bean, ignoreFieldNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -906,17 +906,17 @@ public class BeanUtil {
|
|||||||
* 此方法不判断static属性
|
* 此方法不判断static属性
|
||||||
*
|
*
|
||||||
* @param bean Bean对象
|
* @param bean Bean对象
|
||||||
* @param ignoreFiledNames 忽略检查的字段名
|
* @param ignoreFieldNames 忽略检查的字段名
|
||||||
* @return 是否为空,{@code true} - 空 / {@code false} - 非空
|
* @return 是否为空,{@code true} - 空 / {@code false} - 非空
|
||||||
* @since 4.1.10
|
* @since 4.1.10
|
||||||
*/
|
*/
|
||||||
public static boolean isEmpty(Object bean, String... ignoreFiledNames) {
|
public static boolean isEmpty(Object bean, String... ignoreFieldNames) {
|
||||||
if (null != bean) {
|
if (null != bean) {
|
||||||
for (Field field : ReflectUtil.getFields(bean.getClass())) {
|
for (Field field : ReflectUtil.getFields(bean.getClass())) {
|
||||||
if (ModifierUtil.isStatic(field)) {
|
if (ModifierUtil.isStatic(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((false == ArrayUtil.contains(ignoreFiledNames, field.getName()))
|
if ((false == ArrayUtil.contains(ignoreFieldNames, field.getName()))
|
||||||
&& null != ReflectUtil.getFieldValue(bean, field)) {
|
&& null != ReflectUtil.getFieldValue(bean, field)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -930,11 +930,11 @@ public class BeanUtil {
|
|||||||
* 对象本身为{@code null}也返回true
|
* 对象本身为{@code null}也返回true
|
||||||
*
|
*
|
||||||
* @param bean Bean对象
|
* @param bean Bean对象
|
||||||
* @param ignoreFiledNames 忽略检查的字段名
|
* @param ignoreFieldNames 忽略检查的字段名
|
||||||
* @return 是否包含值为<code>null</code>的属性,{@code true} - 包含 / {@code false} - 不包含
|
* @return 是否包含值为<code>null</code>的属性,{@code true} - 包含 / {@code false} - 不包含
|
||||||
* @since 4.1.10
|
* @since 4.1.10
|
||||||
*/
|
*/
|
||||||
public static boolean hasNullField(Object bean, String... ignoreFiledNames) {
|
public static boolean hasNullField(Object bean, String... ignoreFieldNames) {
|
||||||
if (null == bean) {
|
if (null == bean) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -942,7 +942,7 @@ public class BeanUtil {
|
|||||||
if (ModifierUtil.isStatic(field)) {
|
if (ModifierUtil.isStatic(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((false == ArrayUtil.contains(ignoreFiledNames, field.getName()))
|
if ((false == ArrayUtil.contains(ignoreFieldNames, field.getName()))
|
||||||
&& null == ReflectUtil.getFieldValue(bean, field)) {
|
&& null == ReflectUtil.getFieldValue(bean, field)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user