本文整理汇总了Java中com.nostra13.universalimageloader.cache.memory.impl.FuzzyKeyMemoryCache类的典型用法代码示例。如果您正苦于以下问题:Java FuzzyKeyMemoryCache类的具体用法?Java FuzzyKeyMemoryCache怎么用?Java FuzzyKeyMemoryCache使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FuzzyKeyMemoryCache类属于com.nostra13.universalimageloader.cache.memory.impl包,在下文中一共展示了FuzzyKeyMemoryCache类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initEmptyFieldsWithDefaultValues
import com.nostra13.universalimageloader.cache.memory.impl.FuzzyKeyMemoryCache; //导入依赖的package包/类
private void initEmptyFieldsWithDefaultValues() {
if (this.taskExecutor == null) {
this.taskExecutor = DefaultConfigurationFactory.createExecutor(this.threadPoolSize, this.threadPriority, this.tasksProcessingType);
} else {
this.customExecutor = true;
}
if (this.taskExecutorForCachedImages == null) {
this.taskExecutorForCachedImages = DefaultConfigurationFactory.createExecutor(this.threadPoolSize, this.threadPriority, this.tasksProcessingType);
} else {
this.customExecutorForCachedImages = true;
}
if (this.diskCache == null) {
if (this.diskCacheFileNameGenerator == null) {
this.diskCacheFileNameGenerator = DefaultConfigurationFactory.createFileNameGenerator();
}
this.diskCache = DefaultConfigurationFactory.createDiskCache(this.context, this.diskCacheFileNameGenerator, this.diskCacheSize, this.diskCacheFileCount);
}
if (this.memoryCache == null) {
this.memoryCache = DefaultConfigurationFactory.createMemoryCache(this.memoryCacheSize);
}
if (this.denyCacheImageMultipleSizesInMemory) {
this.memoryCache = new FuzzyKeyMemoryCache(this.memoryCache, MemoryCacheUtils.createFuzzyKeyComparator());
}
if (this.downloader == null) {
this.downloader = DefaultConfigurationFactory.createImageDownloader(this.context);
}
if (this.decoder == null) {
this.decoder = DefaultConfigurationFactory.createImageDecoder(this.writeLogs);
}
if (this.defaultDisplayImageOptions == null) {
this.defaultDisplayImageOptions = DisplayImageOptions.createSimple();
}
}
示例2: initEmptyFieldsWithDefaultValues
import com.nostra13.universalimageloader.cache.memory.impl.FuzzyKeyMemoryCache; //导入依赖的package包/类
private void initEmptyFieldsWithDefaultValues() {
if (this.taskExecutor == null) {
this.taskExecutor = DefaultConfigurationFactory.createExecutor(this
.threadPoolSize, this.threadPriority, this.tasksProcessingType);
} else {
this.customExecutor = true;
}
if (this.taskExecutorForCachedImages == null) {
this.taskExecutorForCachedImages = DefaultConfigurationFactory.createExecutor
(this.threadPoolSize, this.threadPriority, this.tasksProcessingType);
} else {
this.customExecutorForCachedImages = true;
}
if (this.diskCache == null) {
if (this.diskCacheFileNameGenerator == null) {
this.diskCacheFileNameGenerator = DefaultConfigurationFactory
.createFileNameGenerator();
}
this.diskCache = DefaultConfigurationFactory.createDiskCache(this.context, this
.diskCacheFileNameGenerator, this.diskCacheSize, this.diskCacheFileCount);
}
if (this.memoryCache == null) {
this.memoryCache = DefaultConfigurationFactory.createMemoryCache(this.context,
this.memoryCacheSize);
}
if (this.denyCacheImageMultipleSizesInMemory) {
this.memoryCache = new FuzzyKeyMemoryCache(this.memoryCache, MemoryCacheUtils
.createFuzzyKeyComparator());
}
if (this.downloader == null) {
this.downloader = DefaultConfigurationFactory.createImageDownloader(this.context);
}
if (this.decoder == null) {
this.decoder = DefaultConfigurationFactory.createImageDecoder(this.writeLogs);
}
if (this.defaultDisplayImageOptions == null) {
this.defaultDisplayImageOptions = DisplayImageOptions.createSimple();
}
}
示例3: initEmptyFieldsWithDefaultValues
import com.nostra13.universalimageloader.cache.memory.impl.FuzzyKeyMemoryCache; //导入依赖的package包/类
private void initEmptyFieldsWithDefaultValues() {
if (taskExecutor == null) {
taskExecutor = DefaultConfigurationFactory
.createExecutor(threadPoolSize, threadPriority, tasksProcessingType);
} else {
customExecutor = true;
}
if (taskExecutorForCachedImages == null) {
taskExecutorForCachedImages = DefaultConfigurationFactory
.createExecutor(threadPoolSize, threadPriority, tasksProcessingType);
} else {
customExecutorForCachedImages = true;
}
if (discCache == null) {
if (discCacheFileNameGenerator == null) {
discCacheFileNameGenerator = DefaultConfigurationFactory.createFileNameGenerator();
}
discCache = DefaultConfigurationFactory
.createDiscCache(context, discCacheFileNameGenerator, discCacheSize, discCacheFileCount);
}
if (memoryCache == null) {
memoryCache = DefaultConfigurationFactory.createMemoryCache(memoryCacheSize);
}
if (denyCacheImageMultipleSizesInMemory) {
memoryCache = new FuzzyKeyMemoryCache<String, Bitmap>(memoryCache, MemoryCacheUtil
.createFuzzyKeyComparator());
}
if (downloader == null) {
downloader = DefaultConfigurationFactory.createImageDownloader(context);
}
if (decoder == null) {
decoder = DefaultConfigurationFactory.createImageDecoder(writeLogs);
}
if (defaultDisplayImageOptions == null) {
defaultDisplayImageOptions = DisplayImageOptions.createSimple();
}
}
示例4: createMemoryCache
import com.nostra13.universalimageloader.cache.memory.impl.FuzzyKeyMemoryCache; //导入依赖的package包/类
/** Creates default implementation of {@link MemoryCacheAware} depends on incoming parameters */
public static MemoryCacheAware<String, Bitmap> createMemoryCache(int memoryCacheSize, boolean denyCacheImageMultipleSizesInMemory) {
MemoryCacheAware<String, Bitmap> memoryCache = new UsingFreqLimitedMemoryCache(memoryCacheSize);
if (denyCacheImageMultipleSizesInMemory) {
memoryCache = new FuzzyKeyMemoryCache<String, Bitmap>(memoryCache, MemoryCacheUtil.createFuzzyKeyComparator());
}
return memoryCache;
}