MCPcopy Create free account
hub / github.com/wyouflf/xUtils3 / resize

Method resize

xutils/src/main/java/org/xutils/cache/LruCache.java:63–72  ·  view source on GitHub ↗

Sets the size of the cache. @param maxSize The new maximum size.

(int maxSize)

Source from the content-addressed store, hash-verified

61 * @param maxSize The new maximum size.
62 */
63 public void resize(int maxSize) {
64 if (maxSize <= 0) {
65 throw new IllegalArgumentException("maxSize <= 0");
66 }
67
68 synchronized (this) {
69 this.maxSize = maxSize;
70 }
71 trimToSize(maxSize);
72 }
73
74 /**
75 * Returns the value for {@code key} if it exists in the cache or can be

Callers 1

ImageLoaderClass · 0.80

Calls 1

trimToSizeMethod · 0.95

Tested by

no test coverage detected