Returns a string representation of this StringMap in the form of a set of entries, enclosed in braces and separated by the characters ", ". Each entry is rendered as the key, an equals sign "=", and the associated value. @return The string representation of this StringMap
()
| 548 | * @return The string representation of this <code>StringMap</code>. |
| 549 | */ |
| 550 | public String |
| 551 | toString() |
| 552 | { |
| 553 | StringBuffer sb = new StringBuffer(); |
| 554 | |
| 555 | sb.append('{'); |
| 556 | |
| 557 | int length = keys.size(); |
| 558 | for (int i = 0; i < length; i++) { |
| 559 | sb.append(getKey(i)); |
| 560 | sb.append('='); |
| 561 | sb.append(get(i)); |
| 562 | sb.append(", "); |
| 563 | } |
| 564 | if (sb.length() > 1) { |
| 565 | sb.setLength(sb.length() - 2); |
| 566 | } |
| 567 | sb.append('}'); |
| 568 | |
| 569 | return sb.toString(); |
| 570 | } |
| 571 | } |