mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
Added toString method.
This commit is contained in:
parent
772f6c1643
commit
5adfb67a9d
1 changed files with 18 additions and 0 deletions
|
@ -162,4 +162,22 @@ public class CharArrayObjectMap <T> extends CharTable {
|
|||
System.arraycopy(valueTable, 0, values, 0, values.length);
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue