Package org.jxmpp.util
Class Objects
java.lang.Object
org.jxmpp.util.Objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TrequireNonNull(T obj, String parameterName) Checks that the specified object reference is notnulland throws a customizedIllegalArgumentExceptionif it is.
-
Constructor Details
-
Objects
public Objects()
-
-
Method Details
-
requireNonNull
Checks that the specified object reference is notnulland throws a customizedIllegalArgumentExceptionif it is.Note that unlike
java.util.Objects, this method throws anIllegalArgumentExceptioninstead of anNullPointerException.- Type Parameters:
T- the type of the reference.- Parameters:
obj- the object reference to check for nullity.parameterName- the name of the parameter which is null- Returns:
objif not null.- Throws:
IllegalArgumentException- in caseobjisnull.
-