Top Description Methods
org.checkerframework.checker.index.qual

public @Interface NonNegative

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:TYPE_USE, TYPE_PARAMETER
@SubtypeOf:GTENegativeOne
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target, org.checkerframework.framework.qual.SubtypeOf

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]; }

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString