Java 类com.bumptech.glide.DataLoadProvider 实例源码

项目:saarang-iosched    文件:ImageVideoGifDataLoadProvider.java   
public ImageVideoGifDataLoadProvider(DataLoadProvider<ImageVideoWrapper, Bitmap> bitmapProvider,
        DataLoadProvider<InputStream, GifData> gifProvider) {
    cacheDecoder = new GifBitmapWrapperStreamResourceDecoder(new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getCacheDecoder()));
    sourceDecoder = new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getSourceDecoder());
    encoder = new GifBitmapWrapperResourceEncoder(bitmapProvider.getEncoder(), gifProvider.getEncoder());
}
项目:saarang-iosched    文件:FixedLoadProvider.java   
public FixedLoadProvider(ModelLoader<A, T> modelLoader, ResourceTranscoder<Z, R> transcoder,
        DataLoadProvider<T, Z> dataLoadProvider) {
    if (modelLoader == null) {
        throw new NullPointerException("ModelLoader must not be null");
    }
    this.modelLoader = modelLoader;
    if (transcoder == null) {
        throw new NullPointerException("Transcoder must not be null");
    }
    this.transcoder = transcoder;
    if (dataLoadProvider == null) {
        throw new NullPointerException("DataLoadProvider must not be null");
    }
    this.dataLoadProvider = dataLoadProvider;
}
项目:saarang-iosched    文件:DataLoadProviderFactory.java   
@SuppressWarnings("unchecked")
public <T, Z> DataLoadProvider<T, Z> get(Class<T> dataClass, Class<Z> resourceClass) {
    GET_KEY.set(dataClass, resourceClass);
    DataLoadProvider<T, Z> result = providers.get(GET_KEY);
    if (result == null) {
        result = EmptyDataLoadProvider.get();
    }
    return result;
}
项目:AppDevFestSudeste2015    文件:ImageVideoGifDataLoadProvider.java   
public ImageVideoGifDataLoadProvider(DataLoadProvider<ImageVideoWrapper, Bitmap> bitmapProvider,
        DataLoadProvider<InputStream, GifData> gifProvider) {
    cacheDecoder = new GifBitmapWrapperStreamResourceDecoder(new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getCacheDecoder()));
    sourceDecoder = new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getSourceDecoder());
    encoder = new GifBitmapWrapperResourceEncoder(bitmapProvider.getEncoder(), gifProvider.getEncoder());
}
项目:AppDevFestSudeste2015    文件:FixedLoadProvider.java   
public FixedLoadProvider(ModelLoader<A, T> modelLoader, ResourceTranscoder<Z, R> transcoder,
        DataLoadProvider<T, Z> dataLoadProvider) {
    if (modelLoader == null) {
        throw new NullPointerException("ModelLoader must not be null");
    }
    this.modelLoader = modelLoader;
    if (transcoder == null) {
        throw new NullPointerException("Transcoder must not be null");
    }
    this.transcoder = transcoder;
    if (dataLoadProvider == null) {
        throw new NullPointerException("DataLoadProvider must not be null");
    }
    this.dataLoadProvider = dataLoadProvider;
}
项目:AppDevFestSudeste2015    文件:DataLoadProviderFactory.java   
@SuppressWarnings("unchecked")
public <T, Z> DataLoadProvider<T, Z> get(Class<T> dataClass, Class<Z> resourceClass) {
    GET_KEY.set(dataClass, resourceClass);
    DataLoadProvider<T, Z> result = providers.get(GET_KEY);
    if (result == null) {
        result = EmptyDataLoadProvider.get();
    }
    return result;
}
项目:devfestnorte-app    文件:ImageVideoGifDataLoadProvider.java   
public ImageVideoGifDataLoadProvider(DataLoadProvider<ImageVideoWrapper, Bitmap> bitmapProvider,
        DataLoadProvider<InputStream, GifData> gifProvider) {
    cacheDecoder = new GifBitmapWrapperStreamResourceDecoder(new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getCacheDecoder()));
    sourceDecoder = new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getSourceDecoder());
    encoder = new GifBitmapWrapperResourceEncoder(bitmapProvider.getEncoder(), gifProvider.getEncoder());
}
项目:devfestnorte-app    文件:FixedLoadProvider.java   
public FixedLoadProvider(ModelLoader<A, T> modelLoader, ResourceTranscoder<Z, R> transcoder,
        DataLoadProvider<T, Z> dataLoadProvider) {
    if (modelLoader == null) {
        throw new NullPointerException("ModelLoader must not be null");
    }
    this.modelLoader = modelLoader;
    if (transcoder == null) {
        throw new NullPointerException("Transcoder must not be null");
    }
    this.transcoder = transcoder;
    if (dataLoadProvider == null) {
        throw new NullPointerException("DataLoadProvider must not be null");
    }
    this.dataLoadProvider = dataLoadProvider;
}
项目:devfestnorte-app    文件:DataLoadProviderFactory.java   
@SuppressWarnings("unchecked")
public <T, Z> DataLoadProvider<T, Z> get(Class<T> dataClass, Class<Z> resourceClass) {
    GET_KEY.set(dataClass, resourceClass);
    DataLoadProvider<T, Z> result = providers.get(GET_KEY);
    if (result == null) {
        result = EmptyDataLoadProvider.get();
    }
    return result;
}
项目:saarang-iosched    文件:ImageVideoGifDataLoadProvider.java   
public ImageVideoGifDataLoadProvider(DataLoadProvider<ImageVideoWrapper, Bitmap> bitmapProvider,
        DataLoadProvider<InputStream, GifData> gifProvider) {
    cacheDecoder = new GifBitmapWrapperStreamResourceDecoder(new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getCacheDecoder()));
    sourceDecoder = new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getSourceDecoder());
    encoder = new GifBitmapWrapperResourceEncoder(bitmapProvider.getEncoder(), gifProvider.getEncoder());
}
项目:saarang-iosched    文件:FixedLoadProvider.java   
public FixedLoadProvider(ModelLoader<A, T> modelLoader, ResourceTranscoder<Z, R> transcoder,
        DataLoadProvider<T, Z> dataLoadProvider) {
    if (modelLoader == null) {
        throw new NullPointerException("ModelLoader must not be null");
    }
    this.modelLoader = modelLoader;
    if (transcoder == null) {
        throw new NullPointerException("Transcoder must not be null");
    }
    this.transcoder = transcoder;
    if (dataLoadProvider == null) {
        throw new NullPointerException("DataLoadProvider must not be null");
    }
    this.dataLoadProvider = dataLoadProvider;
}
项目:saarang-iosched    文件:DataLoadProviderFactory.java   
@SuppressWarnings("unchecked")
public <T, Z> DataLoadProvider<T, Z> get(Class<T> dataClass, Class<Z> resourceClass) {
    GET_KEY.set(dataClass, resourceClass);
    DataLoadProvider<T, Z> result = providers.get(GET_KEY);
    if (result == null) {
        result = EmptyDataLoadProvider.get();
    }
    return result;
}
项目:saarang-iosched    文件:EmptyDataLoadProvider.java   
@SuppressWarnings("unchecked")
public static <T, Z> DataLoadProvider<T, Z> get() {
    return EMPTY_DATA_LOAD_PROVIDER;
}
项目:saarang-iosched    文件:DataLoadProviderFactory.java   
public <T, Z> void register(Class<T> dataClass, Class<Z> resourceClass, DataLoadProvider provider) {
    providers.put(new MultiClassKey(dataClass, resourceClass), provider);
}
项目:AppDevFestSudeste2015    文件:EmptyDataLoadProvider.java   
@SuppressWarnings("unchecked")
public static <T, Z> DataLoadProvider<T, Z> get() {
    return EMPTY_DATA_LOAD_PROVIDER;
}
项目:AppDevFestSudeste2015    文件:DataLoadProviderFactory.java   
public <T, Z> void register(Class<T> dataClass, Class<Z> resourceClass, DataLoadProvider provider) {
    providers.put(new MultiClassKey(dataClass, resourceClass), provider);
}
项目:devfestnorte-app    文件:EmptyDataLoadProvider.java   
@SuppressWarnings("unchecked")
public static <T, Z> DataLoadProvider<T, Z> get() {
    return EMPTY_DATA_LOAD_PROVIDER;
}
项目:devfestnorte-app    文件:DataLoadProviderFactory.java   
public <T, Z> void register(Class<T> dataClass, Class<Z> resourceClass, DataLoadProvider provider) {
    providers.put(new MultiClassKey(dataClass, resourceClass), provider);
}
项目:saarang-iosched    文件:EmptyDataLoadProvider.java   
@SuppressWarnings("unchecked")
public static <T, Z> DataLoadProvider<T, Z> get() {
    return EMPTY_DATA_LOAD_PROVIDER;
}
项目:saarang-iosched    文件:DataLoadProviderFactory.java   
public <T, Z> void register(Class<T> dataClass, Class<Z> resourceClass, DataLoadProvider provider) {
    providers.put(new MultiClassKey(dataClass, resourceClass), provider);
}