Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation GTEqLengthOf #220

Open
panacekcz opened this issue Mar 17, 2018 · 0 comments
Open

Annotation GTEqLengthOf #220

panacekcz opened this issue Mar 17, 2018 · 0 comments

Comments

@panacekcz
Copy link

Similarly to the annotation @LTEqLengthOf(value), there could be an annotation @GTEqLengthOf(value).
Then @GTEqLengthOf("array") int i; would mean i >= array.length.

As a single known use case, in Guava, the maxLength parameter of Ascii.truncate should be @GTEqLengthOf("#3").

Then, maxLength-truncationIndicator.length() would be @NonNegative.

Alternatively, there could be an annotation establishing the relation in the opposite direction, something like @MaxLength("#2") String truncationIndicator.

This annotation is currently not intended to be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant