@Retention(value=CLASS) @Target(value={METHOD,FIELD,PARAMETER,LOCAL_VARIABLE,TYPE_USE}) public @interface NonPositive
@NonPositive signals that the annotated value must be zero or below.
Library maintainers may use it to declare numeric constraints.
Retention and effect: Persisted in the class file but ignored by the runtime unless Chronicle tooling enforces it.
@NonPositive int offset;
| Annotation | Constraint |
|---|---|
Negative | val < 0 |
@NonPositive | val <= 0 |
NonNegative | val >= 0 |
Positive | val > 0 |
void clear(@NonPositive int count) {
assert count <= 0;
}
These annotations are advisory and may be enforced with
ChronicleAssertions or Java assert.
Negative,
NonNegative,
Positive,
Rangepublic abstract String value
Copyright © 2026 Chronicle Software Ltd. All rights reserved.