/** * @param inputChannel the map file from which the index should be read and cached. * @param capacity the maximum number of entries in the cache. * @throws IllegalArgumentException if the capacity is negative. */ IndexCache(FileChannel inputChannel, int capacity) { this.fileChannel = inputChannel; this.map = new LRUCache<IndexCacheEntryKey, byte[]>(capacity); }
RenderTheme(RenderThemeBuilder renderThemeBuilder) { this.baseStrokeWidth = renderThemeBuilder.baseStrokeWidth; this.baseTextSize = renderThemeBuilder.baseTextSize; this.hasBackgroundOutside = renderThemeBuilder.hasBackgroundOutside; this.mapBackground = renderThemeBuilder.mapBackground; this.mapBackgroundOutside = renderThemeBuilder.mapBackgroundOutside; this.rulesList = new ArrayList<>(); this.poiMatchingCache = new LRUCache<>(MATCHING_CACHE_SIZE); this.wayMatchingCache = new LRUCache<>(MATCHING_CACHE_SIZE); }
private static LRUCache<String, String> createLRUCache(int capacity) { LRUCache<String, String> lruCache = new LRUCache<>(capacity); Assert.assertEquals(capacity, lruCache.capacity); return lruCache; }
/** * @param inputChannel the map file from which the index should be read and cached. * @param capacity the maximum number of entries in the cache. * @throws IllegalArgumentException if the capacity is negative. */ IndexCache(FileChannel inputChannel, int capacity) { this.fileChannel = inputChannel; this.map = new LRUCache<IndexCacheEntryKey, byte[]>(capacity); }
RenderTheme(RenderThemeBuilder renderThemeBuilder) { this.baseStrokeWidth = renderThemeBuilder.baseStrokeWidth; this.baseTextSize = renderThemeBuilder.baseTextSize; this.hasBackgroundOutside = renderThemeBuilder.hasBackgroundOutside; this.mapBackground = renderThemeBuilder.mapBackground; this.mapBackgroundOutside = renderThemeBuilder.mapBackgroundOutside; this.rulesList = new ArrayList<>(); this.poiMatchingCache = new LRUCache<>(MATCHING_CACHE_SIZE); this.wayMatchingCache = new LRUCache<>(MATCHING_CACHE_SIZE); }