Java Code Examples for com.facebook.common.internal.Preconditions#checkElementIndex()
The following examples show how to use
com.facebook.common.internal.Preconditions#checkElementIndex() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MultiDraweeHolder.java From FanXin-based-HuanXin with GNU General Public License v2.0 | 5 votes |
public void add(int index, DraweeHolder<DH> holder) { Preconditions.checkNotNull(holder); Preconditions.checkElementIndex(index, mHolders.size() + 1); mHolders.add(index, holder); if (mIsAttached) { holder.onAttach(); } }
Example 2
Source File: MultiDraweeHolder.java From fresco with MIT License | 5 votes |
public void add(int index, DraweeHolder<DH> holder) { Preconditions.checkNotNull(holder); Preconditions.checkElementIndex(index, mHolders.size() + 1); mHolders.add(index, holder); if (mIsAttached) { holder.onAttach(); } }
Example 3
Source File: AnimatedDrawableBackendImpl.java From FanXin-based-HuanXin with GNU General Public License v2.0 | 4 votes |
@Override public int getTimestampMsForFrame(int frameNumber) { Preconditions.checkElementIndex(frameNumber, mFrameTimestampsMs.length); return mFrameTimestampsMs[frameNumber]; }
Example 4
Source File: AnimatedDrawableBackendImpl.java From fresco with MIT License | 4 votes |
@Override public int getTimestampMsForFrame(int frameNumber) { Preconditions.checkElementIndex(frameNumber, mFrameTimestampsMs.length); return mFrameTimestampsMs[frameNumber]; }
Example 5
Source File: ThumbnailBranchProducer.java From fresco with MIT License | 4 votes |
public ThumbnailBranchProducer(ThumbnailProducer<EncodedImage>... thumbnailProducers) { mThumbnailProducers = Preconditions.checkNotNull(thumbnailProducers); Preconditions.checkElementIndex(0, mThumbnailProducers.length); }