public final class ObjectUtil extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
allNull(Object... o1s)
Return true if ALL of the given objects are null.
|
static boolean |
anyNull(Object... o1s)
Return true if any of the given objects are null.
|
static boolean |
atLeastOneNotNull(Object... o1s)
Return true if at least one of the given objects is not null.
|
static boolean |
equalsAll(Object o1,
Object... o2s)
Return true if o1 equals (according to
Object.equals(Object) ALL of the given objects. |
static boolean |
equalsAny(Object o1,
Object... o2s)
Return true if o1 equals (according to
Object.equals(Object) any of the given objects. |
static boolean |
equalsValue(BigDecimal bd1,
BigDecimal bd2)
Return true if bd1 has the same value (according to
BigDecimalUtil.isSameValue(BigDecimal, BigDecimal) , which takes care of different scales)
as bd2. |
static boolean |
equalsValue(Integer i1,
Integer i2)
Return true if i1 equals (according to
Integer.equals(Object) ) 12. |
static boolean |
equalsValue(Object o1,
Object o2)
Return true if o1 equals (according to
Object.equals(Object) ) o2. |
static boolean |
noneNull(Object... o1s)
Return true if NONE of the given objects are null.
|
static boolean |
notEqualsAny(Object o1,
Object... o2s)
Return true if o1 does NOT equal (according to
Object.equals(Object) any of the given objects. |
public static boolean equalsValue(Integer i1, Integer i2)
Integer.equals(Object)
) 12.
Also returns true if 11 is null and 12 is null! Is safe on either 11 or 12 being null.public static boolean equalsValue(BigDecimal bd1, BigDecimal bd2)
BigDecimalUtil.isSameValue(BigDecimal, BigDecimal)
, which takes care of different scales)
as bd2.
Also returns true if bd1 is null and bd2 is null! Is safe on either bd1 or bd2 being null.public static boolean equalsValue(Object o1, Object o2)
Object.equals(Object)
) o2.
Also returns true if o1 is null and o2 is null! Is safe on either o1 or o2 being null.public static boolean equalsAny(Object o1, Object... o2s)
Object.equals(Object)
any of the given objects.
Also returns true if o1 is null and any of the given objects is null as well!public static boolean equalsAll(Object o1, Object... o2s)
Object.equals(Object)
ALL of the given objects.public static boolean notEqualsAny(Object o1, Object... o2s)
Object.equals(Object)
any of the given objects.
Also returns false if o1 is null and any of the given objects is null as well!public static boolean anyNull(Object... o1s)
public static boolean allNull(Object... o1s)
public static boolean atLeastOneNotNull(Object... o1s)
public static boolean noneNull(Object... o1s)
Copyright © 2006–2022 Appendium - Portfolio Financing Platform. All rights reserved.