in src/main/java/org/apache/commons/collections4/map/Flat3Map.java [1220:1251]
public String toString() {
if (delegateMap != null) {
return delegateMap.toString();
}
if (size == 0) {
return "{}";
}
final StringBuilder buf = new StringBuilder(128);
buf.append('{');
switch (size) { // drop through
case 3:
buf.append(key3 == this ? "(this Map)" : key3);
buf.append('=');
buf.append(value3 == this ? "(this Map)" : value3);
buf.append(CollectionUtils.COMMA);
case 2:
buf.append(key2 == this ? "(this Map)" : key2);
buf.append('=');
buf.append(value2 == this ? "(this Map)" : value2);
buf.append(CollectionUtils.COMMA);
case 1:
buf.append(key1 == this ? "(this Map)" : key1);
buf.append('=');
buf.append(value1 == this ? "(this Map)" : value1);
break;
// case 0: has already been dealt with
default:
throw new IllegalStateException("Invalid map index: " + size);
}
buf.append('}');
return buf.toString();
}