com.levigo.util.base
Class Objects
java.lang.Object
com.levigo.util.base.Objects
public class Objects
- extends Object
Utility classes which don't fit anywhere else. Yet.
- Author:
- hennejg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
equals
public static final boolean equals(Object o1,
Object o2)
- Checks two objects for equality considering whether any of them is
null
.
- Parameters:
o1
- o2
-
- Returns:
true
if both objects are null
or both are non-
null
and o1.equals(o1) returned true
assertNotNull
public static void assertNotNull(String name,
Object value)
- Checks whether the given
value
is null
and throws an
IllegalArgumentException
.
- Parameters:
name
- the argument name. Used to enrich the exception messagevalue
- the value to be checked