Module utility.invariant
Interface Preconditions
public interface Preconditions
Utility interface providing static precondition checks for method arguments.
Preconditions are checked at the entry point of a method or constructor to ensure that supplied arguments meet requirements before any work is performed.
- See Also:
-
Method Summary
Static Methods
-
Method Details
-
requireNonNull
- Type Parameters:
T- the type of the object being checked- Parameters:
object- the value to check; must not benullmessage- the detail message for the exception if the check fails- Throws:
NullPointerException- ifobjectisnull
-