android.support.annotation.NonNull.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中android.support.annotation.NonNull.<init>()方法的一些代码示例,展示了NonNull.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NonNull.<init>()方法的具体详情如下:
包路径:android.support.annotation.NonNull
类名称:NonNull
方法名:<init>

NonNull.<init>介绍

暂无

代码示例

代码示例来源:origin: bumptech/glide

/**
 * Internal method.
 */
@NonNull
public RequestManagerRetriever getRequestManagerRetriever() {
 return requestManagerRetriever;
}

代码示例来源:origin: bumptech/glide

/**
  * Returns the class of data this factory can produce
  * {@link com.bumptech.glide.load.data.DataRewinder}s for.
  */
 @NonNull
 Class<T> getDataClass();
}

代码示例来源:origin: bumptech/glide

@NonNull
@Override
public DataSource getDataSource() {
 return DataSource.LOCAL;
}

代码示例来源:origin: bumptech/glide

@NonNull
 @Override
 public Class<InputStream> getDataClass() {
  return InputStream.class;
 }
}

代码示例来源:origin: bumptech/glide

@NonNull
@Override
public Class<InputStream> getDataClass() {
 return InputStream.class;
}

代码示例来源:origin: bumptech/glide

@NonNull
 @Override
 public DataSource getDataSource() {
  return DataSource.REMOTE;
 }
}

代码示例来源:origin: bumptech/glide

@NonNull
@Override
public Object rewindAndGet() {
 return data;
}

代码示例来源:origin: bumptech/glide

/**
  * Writes data to the file and returns true if the write was successful and should be committed,
  * and false if the write should be aborted.
  *
  * @param file The File the Writer should write to.
  */
 boolean write(@NonNull File file);
}

代码示例来源:origin: bumptech/glide

/**
  * Called when the load fails.
  *
  * @param e a non-null {@link Exception} indicating why the load failed.
  */
 void onLoadFailed(@NonNull Exception e);
}

代码示例来源:origin: bumptech/glide

/**
 * Helper constructor that accepts an {@link FragmentActivity}.
 */
public RecyclerViewPreloader(@NonNull FragmentActivity fragmentActivity,
  @NonNull PreloadModelProvider<T> preloadModelProvider,
  @NonNull PreloadSizeProvider<T> preloadDimensionProvider,
  int maxPreload) {
 this(Glide.with(fragmentActivity), preloadModelProvider, preloadDimensionProvider, maxPreload);
}

代码示例来源:origin: bumptech/glide

/**
 * Helper constructor that accepts an {@link Fragment}.
 */
public RecyclerViewPreloader(@NonNull Fragment fragment,
  @NonNull PreloadModelProvider<T> preloadModelProvider,
  @NonNull PreloadSizeProvider<T> preloadDimensionProvider,
  int maxPreload) {
 this(Glide.with(fragment), preloadModelProvider, preloadDimensionProvider, maxPreload);
}

代码示例来源:origin: bumptech/glide

@NonNull
 private CharSequence safeSequence(@Nullable CharSequence sequence) {
  if (sequence == null) {
   return EMPTY_SEQUENCE;
  } else {
   return sequence;
  }
 }
}

代码示例来源:origin: bumptech/glide

/**
 * Add bitmap to the cache with the given key.
 *
 * @param key      The key to retrieve the bitmap.
 * @param resource The {@link com.bumptech.glide.load.engine.EngineResource} to store.
 * @return The old value of key (null if key is not in map).
 */
@Nullable
Resource<?> put(@NonNull Key key, @Nullable Resource<?> resource);

代码示例来源:origin: bumptech/glide

/**
 * Registers a new {@link com.bumptech.glide.load.data.DataRewinder.Factory} to handle a
 * non-default data type that can be rewind to allow for efficient reads of file headers.
 */
@NonNull
public Registry register(@NonNull DataRewinder.Factory<?> factory) {
 dataRewinderRegistry.register(factory);
 return this;
}

代码示例来源:origin: bumptech/glide

@Override
protected void onItemEvicted(@NonNull Key key, @Nullable Resource<?> item) {
 if (listener != null && item != null) {
  listener.onResourceRemoved(item);
 }
}

代码示例来源:origin: bumptech/glide

@NonNull
@Override
public Class<Z> getResourceClass() {
 return resource.getResourceClass();
}

代码示例来源:origin: bumptech/glide

@NonNull
public List<ImageHeaderParser> getImageHeaderParsers() {
 List<ImageHeaderParser> result = imageHeaderParserRegistry.getParsers();
 if (result.isEmpty()) {
  throw new NoImageHeaderParserException();
 }
 return result;
}

代码示例来源:origin: bumptech/glide

@Override
public void loadData(@NonNull Priority priority,
  @NonNull DataCallback<? super InputStream> callback) {
 request = requestFactory.create(url.toStringUrl(), callback, glideToVolleyPriority(priority),
   url.getHeaders());
 requestQueue.add(request);
}

代码示例来源:origin: bumptech/glide

@NonNull
@Override
public Class<Data> getDataClass() {
 return wrapped.getDataClass();
}

代码示例来源:origin: bumptech/glide

@Nullable
@Override
public LoadData<Data> buildLoadData(
  @NonNull WaitModel<Model> waitModel, int width, int height, @NonNull Options options) {
 LoadData<Data> wrappedLoadData = wrapped
   .buildLoadData(waitModel.wrapped, width, height, options);
 if (wrappedLoadData == null) {
  return null;
 }
 return new LoadData<>(
   wrappedLoadData.sourceKey, new WaitFetcher<>(wrappedLoadData.fetcher, waitModel.latch));
}

相关文章

NonNull类方法