Annotation Interface NonNegative


The annotated expression evaluates to an integer greater than or equal to 0.

Consider the following example, from a collection that wraps an array. This constructor creates the delegate array, which must have a non-negative size.


 ArrayWrapper(@NonNegative int size) { delegate = new Object[size]; }
 
See the Checker Framework Manual:
Index Checker