Annotation Type NonnullElements

@Documented @Target({FIELD,LOCAL_VARIABLE,METHOD,PARAMETER}) public @interface NonnullElements
Indicates that the annotated collection cannot contain any null elements:
  • Input collections as parameters MUST NOT contain any null elements.
  • Collections returned by methods WILL NOT contain any null elements, and if mutable, callers MUST NOT add a null element.

Behavior is undefined if these constraints are violated. Some form of exception should be expected.