Annotation Type LessThan
-
@Documented @Retention(RUNTIME) @Target({TYPE_PARAMETER,TYPE_USE}) @SubtypeOf(LessThanUnknown.class) public @interface LessThan
An annotation indicating the relationship between values with a byte, short, char, int, or long type.If an expression's type has this annotation, then at run time, the expression evaluates to a value that is less than the value of the expression in the annotation.
@LessThan("end + 1")is equivalent to@LessThanOrEqual("end").Subtyping:
@LessThan({"a", "b"}) <: @LessThan({"a"})@LessThan({"a", "b"})is not related to@LessThan({"a", "c"}).
-
-
Element Detail
-
value
@JavaExpression String[] value
The annotated expression's value is less than this expression.The expressions in
valuemay be addition/subtraction of any number of Java expressions. For example,@LessThan(value = "x + y + 2"}.The expression in
valuemust be final or constant or the addition/subtract of final or constant expressions.
-
-