InspectableProperty.FlagEntry

Added in 1.1.0
Deprecated in 1.3.0

@Target(allowedTargets = [AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CLASS])
@Retention(value = AnnotationRetention.SOURCE)
public annotation InspectableProperty.FlagEntry


One flag value of many that may be packed into a primitive {int}.

Summary

Public constructors

FlagEntry(@NonNull String name, int target, int mask)

Public methods

final int

A mask that the property will be bitwise anded with before comparing to the target.

final @NonNull String

The string name of this flag.

final int

A target value that the property's value must equal after masking.

Public constructors

FlagEntry

public FlagEntry(@NonNull String name, int target, int mask)

Public methods

getMask

public final int getMask()

A mask that the property will be bitwise anded with before comparing to the target.

If set to 0 (the default), the value of target will be used as a mask. Zero was chosen as the default since bitwise and with zero is always zero.

Returns
int

A mask, or 0 to use the target as a mask

getName

public final @NonNull String getName()

The string name of this flag.

Returns
@NonNull String

A string name

getTarget

public final int getTarget()

A target value that the property's value must equal after masking.

If a mask is not supplied (i.e., mask is 0), the target will be reused as the mask. This handles the common case where no flags mutually exclude each other.

Returns
int

The target value to compare against