Size
@Target([AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FIELD, AnnotationTarget.ANNOTATION_CLASS]) class Size
androidx.annotation.Size |
Denotes that the annotated element should have a given size or length. Note that "-1" means "unset". Typically used with a parameter or return value of type array or collection.
Example:
<code>public void getLocationInWindow(@Size(2) int[] location) { ... } </code>
Summary
Public constructors | |
---|---|
Denotes that the annotated element should have a given size or length. |
Properties | |
---|---|
Long |
A maximum size, inclusive |
Long |
A minimum size, inclusive |
Long |
The size must be a multiple of this factor |
Long |
An exact size (or -1 if not specified) |
Public constructors
<init>
Size(
value: Long,
min: Long,
max: Long,
multiple: Long)
Denotes that the annotated element should have a given size or length. Note that "-1" means "unset". Typically used with a parameter or return value of type array or collection.
Example:
<code>public void getLocationInWindow(@Size(2) int[] location) { ... } </code>