java.lang.Object | |
↳ | com.h6ah4i.android.widget.advrecyclerview.adapter.ItemIdComposer |
Utility class providing "Composed item ID" related definitions and methods.
Spec:
bit 63 | Reserved |
---|---|
bit 62-56 | View type segment |
bit 55-28 | Group ID |
bit 27-0 | Child ID |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
long | BIT_MASK_CHILD_ID | Bit mask of the expandable child ID part. | |||||||||
long | BIT_MASK_GROUP_ID | Bit mask of the expandable group ID part. | |||||||||
long | BIT_MASK_RESERVED_SIGN_FLAG | Bit mask of the reserved sign flag part. | |||||||||
long | BIT_MASK_SEGMENT | Bit mask of the segment part. | |||||||||
int | BIT_OFFSET_CHILD_ID | Bit offset of the child ID part. | |||||||||
int | BIT_OFFSET_GROUP_ID | Bit offset of the group ID part. | |||||||||
int | BIT_OFFSET_RESERVED_SIGN_FLAG | Bit offset of the reserved sign flag part. | |||||||||
int | BIT_OFFSET_SEGMENT | Bit offset of the segment part. | |||||||||
int | BIT_WIDTH_CHILD_ID | Bit width of the expandable child ID part. | |||||||||
int | BIT_WIDTH_GROUP_ID | Bit width of the expandable group ID part. | |||||||||
int | BIT_WIDTH_RESERVED_SIGN_FLAG | Bit width of the reserved sign flag part. | |||||||||
int | BIT_WIDTH_SEGMENT | Bit width of the segment part. | |||||||||
long | MAX_CHILD_ID | Maximum value of child ID. | |||||||||
long | MAX_GROUP_ID | Maximum value of group ID. | |||||||||
int | MAX_SEGMENT | Maximum value of segment. | |||||||||
long | MAX_WRAPPED_ID | Minimum value of wrapped ID (= group + child) ID. | |||||||||
long | MIN_CHILD_ID | Minimum value of child ID. | |||||||||
long | MIN_GROUP_ID | Minimum value of group ID. | |||||||||
int | MIN_SEGMENT | Minimum value of segment. | |||||||||
long | MIN_WRAPPED_ID | Minimum value of wrapped ID (= group + child) ID. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static long |
composeExpandableChildId(long groupId, long childId)
Makes a composed ID which represents a child item of an expandable group.
| ||||||||||
static long |
composeExpandableGroupId(long groupId)
Makes a composed ID which represents an expandable group item.
| ||||||||||
static long |
composeSegment(int segment, long wrappedId)
Makes a composed ID with specified segment and wrapped ID.
| ||||||||||
static long |
extractExpandableChildIdPart(long composedId)
Extracts "Child ID" part from composed ID.
| ||||||||||
static long |
extractExpandableGroupIdPart(long composedId)
Extracts "Group ID" part from composed ID.
| ||||||||||
static int |
extractSegmentPart(long composedId)
Extracts "Segment" part from composed ID.
| ||||||||||
static long |
extractWrappedIdPart(long composedId)
Extracts "Wrapped ID" (group ID + child ID) part from composed ID.
| ||||||||||
static boolean |
isExpandableGroup(long composedId)
Checks the composed ID is a expandable group or not.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Bit mask of the expandable child ID part.
Bit mask of the expandable group ID part.
Bit mask of the reserved sign flag part.
Bit mask of the segment part.
Bit offset of the child ID part.
Bit offset of the group ID part.
Bit offset of the reserved sign flag part.
Bit offset of the segment part.
Bit width of the expandable child ID part.
Bit width of the expandable group ID part.
Bit width of the reserved sign flag part.
Bit width of the segment part.
Maximum value of child ID.
Maximum value of group ID.
Maximum value of segment.
Minimum value of wrapped ID (= group + child) ID.
Minimum value of child ID.
Minimum value of group ID.
Minimum value of segment.
Minimum value of wrapped ID (= group + child) ID.
Makes a composed ID which represents a child item of an expandable group.
groupId | Group item ID |
---|---|
childId | Child item ID |
Makes a composed ID which represents an expandable group item.
groupId | Group item ID |
---|
Makes a composed ID with specified segment and wrapped ID.
segment | Segment |
---|---|
wrappedId | Wrapped ID |
Extracts "Child ID" part from composed ID.
composedId | Composed ID |
---|
NO_ID
.
Extracts "Group ID" part from composed ID.
composedId | Composed ID |
---|
NO_ID
.
Extracts "Segment" part from composed ID.
composedId | Composed ID |
---|
Extracts "Wrapped ID" (group ID + child ID) part from composed ID.
composedId | Composed ID |
---|
Checks the composed ID is a expandable group or not.
composedId | Composed ID |
---|