Register now for Android Dev Summit 2019!

InspectableProperty.FlagEntry

public static abstract @interface InspectableProperty.FlagEntry
implements Annotation

androidx.annotation.InspectableProperty.FlagEntry


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

Summary

Public methods

int mask()

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

String name()

The string name of this flag.

int target()

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

Inherited methods

Public methods

mask

public int mask ()

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

name

public String name ()

The string name of this flag.

Returns
String A string name

target

public int target ()

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