Size
public
abstract
@interface
Size
implements
Annotation
android.support.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:
public void getLocationInWindow(@Size(2) int[] location) {
...
}
Summary
Public methods | |
---|---|
long
|
max()
A maximum size, inclusive |
long
|
min()
A minimum size, inclusive |
long
|
multiple()
The size must be a multiple of this factor |
long
|
value()
An exact size (or -1 if not specified) |
Inherited methods | |
---|---|
From
interface
java.lang.annotation.Annotation
|
Public methods
max
long max ()
A maximum size, inclusive
Returns | |
---|---|
long |
min
long min ()
A minimum size, inclusive
Returns | |
---|---|
long |
multiple
long multiple ()
The size must be a multiple of this factor
Returns | |
---|---|
long |
value
long value ()
An exact size (or -1 if not specified)
Returns | |
---|---|
long |
Annotations
- AnimatorRes
- AnimRes
- AnyRes
- AnyThread
- ArrayRes
- AttrRes
- BinderThread
- BoolRes
- CallSuper
- CheckResult
- ColorInt
- ColorLong
- ColorRes
- DimenRes
- Dimension
- DrawableRes
- FloatRange
- FontRes
- FractionRes
- GuardedBy
- HalfFloat
- IdRes
- IntDef
- IntegerRes
- InterpolatorRes
- IntRange
- Keep
- LayoutRes
- LongDef
- MainThread
- MenuRes
- NavigationRes
- NonNull
- Nullable
- PluralsRes
- Px
- RawRes
- RequiresApi
- RequiresPermission
- RequiresPermission.Read
- RequiresPermission.Write
- RestrictTo
- Size
- StringDef
- StringRes
- StyleableRes
- StyleRes
- TransitionRes
- UiThread
- VisibleForTesting
- WorkerThread
- XmlRes
Enums