src/java.desktop/share/classes/javax/swing/MultiUIDefaults.java

Print this page
rev 10520 : 8055723[client]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>


 178         return value;
 179     }
 180 
 181     @Override
 182     public void clear() {
 183         super.clear();
 184         for (UIDefaults table : tables) {
 185             if (table != null) {
 186                 table.clear();
 187             }
 188         }
 189     }
 190 
 191     @Override
 192     public synchronized String toString() {
 193         StringBuilder sb = new StringBuilder();
 194         sb.append("{");
 195         Enumeration<?> keys = keys();
 196         while (keys.hasMoreElements()) {
 197             Object key = keys.nextElement();
 198             sb.append(key + "=" + get(key) + ", ");
 199         }
 200         int length = sb.length();
 201         if (length > 1) {
 202             sb.delete(length-2, length);
 203         }
 204         sb.append("}");
 205         return sb.toString();
 206     }
 207 }


 178         return value;
 179     }
 180 
 181     @Override
 182     public void clear() {
 183         super.clear();
 184         for (UIDefaults table : tables) {
 185             if (table != null) {
 186                 table.clear();
 187             }
 188         }
 189     }
 190 
 191     @Override
 192     public synchronized String toString() {
 193         StringBuilder sb = new StringBuilder();
 194         sb.append("{");
 195         Enumeration<?> keys = keys();
 196         while (keys.hasMoreElements()) {
 197             Object key = keys.nextElement();
 198             sb.append(key).append('=').append(get(key)).append(", ");
 199         }
 200         int length = sb.length();
 201         if (length > 1) {
 202             sb.delete(length - 2, length);
 203         }
 204         sb.append('}');
 205         return sb.toString();
 206     }
 207 }