MCPcopy
hub / github.com/google/guava / toString

Method toString

guava/src/com/google/common/cache/CacheBuilder.java:1084–1121  ·  view source on GitHub ↗

Returns a string representation for this CacheBuilder instance. The exact form of the returned string is not specified.

()

Source from the content-addressed store, hash-verified

1082 * string is not specified.
1083 */
1084 @Override
1085 public String toString() {
1086 MoreObjects.ToStringHelper s = MoreObjects.toStringHelper(this);
1087 if (initialCapacity != UNSET_INT) {
1088 s.add("initialCapacity", initialCapacity);
1089 }
1090 if (concurrencyLevel != UNSET_INT) {
1091 s.add("concurrencyLevel", concurrencyLevel);
1092 }
1093 if (maximumSize != UNSET_INT) {
1094 s.add("maximumSize", maximumSize);
1095 }
1096 if (maximumWeight != UNSET_INT) {
1097 s.add("maximumWeight", maximumWeight);
1098 }
1099 if (expireAfterWriteNanos != UNSET_INT) {
1100 s.add("expireAfterWrite", expireAfterWriteNanos + "ns");
1101 }
1102 if (expireAfterAccessNanos != UNSET_INT) {
1103 s.add("expireAfterAccess", expireAfterAccessNanos + "ns");
1104 }
1105 if (keyStrength != null) {
1106 s.add("keyStrength", Ascii.toLowerCase(keyStrength.toString()));
1107 }
1108 if (valueStrength != null) {
1109 s.add("valueStrength", Ascii.toLowerCase(valueStrength.toString()));
1110 }
1111 if (keyEquivalence != null) {
1112 s.addValue("keyEquivalence");
1113 }
1114 if (valueEquivalence != null) {
1115 s.addValue("valueEquivalence");
1116 }
1117 if (removalListener != null) {
1118 s.addValue("removalListener");
1119 }
1120 return s.toString();
1121 }
1122
1123 /**
1124 * Returns the number of nanoseconds of the given duration without throwing or overflowing.

Callers

nothing calls this directly

Calls 5

toStringHelperMethod · 0.95
toLowerCaseMethod · 0.95
addMethod · 0.65
toStringMethod · 0.65
addValueMethod · 0.45

Tested by

no test coverage detected