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

Method equals

output/java_guava/1.4.13/CacheBuilderSpec.java:243–264  ·  view source on GitHub ↗
(@Nullable Object obj)

Source from the content-addressed store, hash-verified

241 }
242
243 @Override
244 public boolean equals(@Nullable Object obj) {
245 if (this == obj) {
246 return true;
247 }
248 if (!(obj instanceof CacheBuilderSpec)) {
249 return false;
250 }
251 CacheBuilderSpec that = (CacheBuilderSpec) obj;
252 return Objects.equal(initialCapacity, that.initialCapacity)
253&& Objects.equal(maximumSize, that.maximumSize)
254&& Objects.equal(maximumWeight, that.maximumWeight)
255&& Objects.equal(concurrencyLevel, that.concurrencyLevel)
256&& Objects.equal(keyStrength, that.keyStrength)
257&& Objects.equal(valueStrength, that.valueStrength)
258&& Objects.equal(recordStats, that.recordStats)
259 && Objects.equal(durationInNanos(writeExpirationDuration, writeExpirationTimeUnit), durationInNanos(that.writeExpirationDuration, that.writeExpirationTimeUnit))
260 && Objects.equal(durationInNanos(accessExpirationDuration, accessExpirationTimeUnit), durationInNanos(that.accessExpirationDuration, that.accessExpirationTimeUnit))
261&& Objects.equal(
262 durationInNanos(refreshDuration, refreshTimeUnit),
263 durationInNanos(that.refreshDuration, that.refreshTimeUnit));
264 }
265
266 /**
267 * Converts an expiration duration/unit pair into a single Long for hashing and equality. Uses

Callers

nothing calls this directly

Calls 2

equalMethod · 0.95
durationInNanosMethod · 0.95

Tested by

no test coverage detected