IntFlagMapping
public
final
class
IntFlagMapping
extends Object
| java.lang.Object | |
| ↳ | android.view.inspector.IntFlagMapping |
Maps the values of an int property to sets of string for properties that encode flags.
An InspectionCompanion may provide an instance of this class to a PropertyMapper
for flag values packed into primitive int properties.
Each flag has a mask and a target value, for non-exclusive flags, the target can also be used as
the mask. A given integer value is compared against each flag to find what flags are active for
it by bitwise anding it with the mask and comparing the result against the target, that is,
(value & mask) == target.
This class is immutable, and must be constructed by a Builder.
Summary
Nested classes | |
|---|---|
class |
IntFlagMapping.Builder
A builder for |
Public methods | |
|---|---|
Set<String>
|
get(int value)
Get an array of the names of enabled flags for a given property value. |
Inherited methods | |
|---|---|
Public methods
get
public Set<String> get (int value)
Get an array of the names of enabled flags for a given property value.
| Parameters | |
|---|---|
value |
int: The value of the property |
| Returns | |
|---|---|
Set<String> |
The names of the enabled flags, empty if no flags enabled
This value will never be null. |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.