(int capacity)
| 84 | return imageCache; |
| 85 | } |
| 86 | private void initCache(int capacity) { |
| 87 | //override maxCardCapacity |
| 88 | maxCardCapacity = capacity; |
| 89 | //init q |
| 90 | q = EvictingQueue.create(capacity); |
| 91 | //init syncQ for threadsafe use |
| 92 | syncQ = Queues.synchronizedQueue(q); |
| 93 | //cap |
| 94 | int cl = GuiBase.isAndroid() ? maxCardCapacity + (capacity / 3) : 400; |
| 95 | cardsLoaded = new HashSet<>(cl); |
| 96 | } |
| 97 | |
| 98 | private Set<String> getCardsLoaded() { |
| 99 | if (cardsLoaded == null) { |
no test coverage detected