JetBrains / JetBrains/java-annotations

Double/float range annotation

Open
#122 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
463
Forks
72
PR merge metrics
No merged PRs in 30d

Description

It would be incredibly useful to have something similar to `@Range` for doubles/floats.

For example, to indicate that the return value is always in the range `[0, 1]` (0 to 1, inclusive)

something like
```java
@Documented
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.TYPE_USE})
public @interface DoubleRange {
double from();
double to();
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.