MCPcopy Create free account
hub / github.com/antlr/codebuff / minus

Method minus

corpus/java/training/guava/cache/CacheStats.java:221–229  ·  view source on GitHub ↗

Returns a new CacheStats representing the difference between this CacheStats and other. Negative values, which aren't supported by CacheStats will be rounded up to zero.

(CacheStats other)

Source from the content-addressed store, hash-verified

219 * rounded up to zero.
220 */
221 public CacheStats minus(CacheStats other) {
222 return new CacheStats(
223 Math.max(0, hitCount - other.hitCount),
224 Math.max(0, missCount - other.missCount),
225 Math.max(0, loadSuccessCount - other.loadSuccessCount),
226 Math.max(0, loadExceptionCount - other.loadExceptionCount),
227 Math.max(0, totalLoadTime - other.totalLoadTime),
228 Math.max(0, evictionCount - other.evictionCount));
229 }
230
231 /**
232 * Returns a new {@code CacheStats} representing the sum of this {@code CacheStats} and

Callers

nothing calls this directly

Calls 1

maxMethod · 0.45

Tested by

no test coverage detected