@Retention(value=CLASS) @Target(value={METHOD,FIELD,PARAMETER,LOCAL_VARIABLE,TYPE_USE}) public @interface Positive
@Positive states that the annotated value must be greater than zero.
It helps library maintainers and tools document numeric expectations.
Retention and effect: Persisted in the class file with no direct runtime effect unless Chronicle tooling interprets it.
@Positive long count;
| Annotation | Constraint |
|---|---|
Negative | val < 0 |
NonPositive | val <= 0 |
NonNegative | val >= 0 |
@Positive | val > 0 |
void increment(@Positive int delta) {
assert delta > 0;
}
These annotations are advisory and may be enforced with
ChronicleAssertions or Java assert.
Negative,
NonNegative,
NonPositive,
Rangepublic abstract String value
Copyright © 2026 Chronicle Software Ltd. All rights reserved.