Prints node attributes. @param attributes the attributes to print
(Map attributes)
| 140 | * @param attributes the attributes to print |
| 141 | */ |
| 142 | protected void printAttributes(Map attributes) { |
| 143 | out.print("("); |
| 144 | boolean first = true; |
| 145 | for (Object o : attributes.entrySet()) { |
| 146 | Map.Entry entry = (Map.Entry) o; |
| 147 | if (first) { |
| 148 | first = false; |
| 149 | } else { |
| 150 | out.print(", "); |
| 151 | } |
| 152 | out.print(entry.getKey().toString()); |
| 153 | out.print(":"); |
| 154 | if (entry.getValue() instanceof String) { |
| 155 | out.print("'" + entry.getValue() + "'"); |
| 156 | } else { |
| 157 | out.print(FormatHelper.toString(entry.getValue())); |
| 158 | } |
| 159 | } |
| 160 | out.print(")"); |
| 161 | } |
| 162 | |
| 163 | } |