@Override public void setAlpha(@IntRange(from = 0, to = 255) int alpha) { this.alpha = alpha; }
void write(@Nullable IntRange intRange) { checkAnnotationNotNull(intRange); // Args: validationContext, value, from, to BaseAnnotationWriter baseWriter = new BaseAnnotationWriter(getter, CHECK_INT_RANGE_METHOD_NAME, true); baseWriter.addArg(LITERAL_LONG, intRange.from(), true); baseWriter.addArg(LITERAL_LONG, intRange.to(), true); buildStatements(baseWriter.getFormattedString(), baseWriter.getArgs()); }
/** * Extracts "Segment" part from composed ID. * * @param composedId Composed ID * @return Segment part */ @IntRange(from = MIN_SEGMENT, to = MAX_SEGMENT) public static int extractSegmentPart(long composedId) { return (int) ((composedId & BIT_MASK_SEGMENT) >>> BIT_OFFSET_SEGMENT); }
/** * Extracts "Segment" part from composed view type. * * @param composedViewType Composed view type * @return Segment part */ @IntRange(from = MIN_SEGMENT, to = MAX_SEGMENT) public static int extractSegmentPart(int composedViewType) { return (composedViewType & BIT_MASK_SEGMENT) >>> BIT_OFFSET_SEGMENT; }
/** * Extracts "Wrapped view type" part from composed view type. * * @param composedViewType Composed view type * @return Wrapped view type part */ @IntRange(from = MIN_WRAPPED_VIEW_TYPE, to = MAX_WRAPPED_VIEW_TYPE) public static int extractWrappedViewTypePart(int composedViewType) { return (composedViewType << (32 - BIT_WIDTH_WRAPPED_VIEW_TYPE - BIT_OFFSET_WRAPPED_VIEW_TYPE)) >> (32 - BIT_WIDTH_WRAPPED_VIEW_TYPE); }
/** * <p>Gets the ID for the group at the given position. This group ID must be unique across groups.</p> * <p>The combined ID (see {@link RecyclerViewExpandableItemManager#getCombinedGroupId(long)}) * must be unique across ALL items (groups and all children).</p> * * @param groupPosition the position of the group for which the ID is wanted * @return the ID associated with the group */ @IntRange(from = ItemIdComposer.MIN_GROUP_ID, to = ItemIdComposer.MAX_GROUP_ID) long getGroupId(int groupPosition);
/** * @return alpha channel for colors */ @IntRange(from = 0, to = 255) public int getAlpha() { return mAlpha; }
/** * @return The maximal available alpha. */ @IntRange(from = 0, to = 255) public int getMaximumAlpha() { return mMaximumAlpha; }
@Override @IntRange(from = 0, to = 255) public int getAlpha() { return mAlpha; }
/** * Gets the view type of the specified group. * * @param groupPosition the position of the group for which the view type is wanted * @return integer value identifying the type of the view needed to represent the group item at position. Type codes need positive number but not be contiguous. */ @IntRange(from = ItemViewTypeComposer.MIN_WRAPPED_VIEW_TYPE, to = ItemViewTypeComposer.MAX_WRAPPED_VIEW_TYPE) int getGroupItemViewType(int groupPosition);
/** * Gets the view type of the specified child. * * @param groupPosition the position of the group that contains the child * @param childPosition the position of the child within the group for which the view type is wanted * @return integer value identifying the type of the view needed to represent the group item at position. Type codes need positive number but not be contiguous. */ @IntRange(from = ItemViewTypeComposer.MIN_WRAPPED_VIEW_TYPE, to = ItemViewTypeComposer.MAX_WRAPPED_VIEW_TYPE) int getChildItemViewType(int groupPosition, int childPosition);
/** * @return The minimal available alpha. */ @IntRange(from = 0, to = 255) public int getMinimumAlpha() { return mMinimumAlpha; }
/** * just a helper method to get the alpha value * * @return current alpha */ @IntRange(from = 0, to = 255) public int getCompatAlpha() { return mAlpha; }
/** * <p>Gets the ID for the given child within the given group.</p> * <p>This ID must be unique across all children within the group. * The combined ID (see {@link RecyclerViewExpandableItemManager#getCombinedChildId(long, long)}) * must be unique across ALL items (groups and all children).</p> * * @param groupPosition the position of the group that contains the child * @param childPosition the position of the child within the group for which the ID is wanted * @return the ID associated with the child */ @IntRange(from = ItemIdComposer.MIN_CHILD_ID, to = ItemIdComposer.MAX_CHILD_ID) long getChildId(int groupPosition, int childPosition);
@IntRange(from=0, to=59) public int getSecond() { return second; }
@IntRange(from=0, to=59) public int getMinute() { return minute; }
@IntRange(from=0, to=23) public int getHour() { return hour; }
/** * Setter for a maximum size of a byte array that may be write at once * If this is not specified - the default value of the connection's MTU is used * * @param maxBatchSize the maximum size of a byte array to write at once * @return the LongWriteOperationBuilder */ LongWriteOperationBuilder setMaxBatchSize(@IntRange(from = 1, to = GATT_MTU_MAXIMUM - GATT_WRITE_MTU_OVERHEAD) int maxBatchSize);