Skip to content

Double/float range annotation #122

Description

@solonovamax

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions