1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Added toString method.

This commit is contained in:
Sergey Prigogin 2013-12-03 18:18:50 -08:00
parent 772f6c1643
commit 5adfb67a9d

View file

@ -162,4 +162,22 @@ public class CharArrayObjectMap <T> extends CharTable {
System.arraycopy(valueTable, 0, values, 0, values.length); System.arraycopy(valueTable, 0, values, 0, values.length);
return values; return values;
} }
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append('{');
for (int i = 0; i < size(); i++) {
char[] key = keyAt(i);
if (key != null) {
if (i != 0)
buf.append(", "); //$NON-NLS-1$
buf.append(key);
buf.append("="); //$NON-NLS-1$
buf.append(getAt(i));
}
}
buf.append('}');
return buf.toString();
}
} }