./src/share/classes/java/lang/StringBuffer.java

Print this page
rev 5707 : [mq]: StringRepeat


 302         // Note, synchronization achieved via other invocations
 303         if (s == null)
 304             s = "null";
 305         if (s instanceof String)
 306             return this.append((String)s);
 307         if (s instanceof StringBuffer)
 308             return this.append((StringBuffer)s);
 309         return this.append(s, 0, s.length());
 310     }
 311 
 312     /**
 313      * @throws IndexOutOfBoundsException {@inheritDoc}
 314      * @since      1.5
 315      */
 316     public synchronized StringBuffer append(CharSequence s, int start, int end)
 317     {
 318         super.append(s, start, end);
 319         return this;
 320     }
 321 










 322     public synchronized StringBuffer append(char[] str) {
 323         super.append(str);
 324         return this;
 325     }
 326 
 327     /**
 328      * @throws IndexOutOfBoundsException {@inheritDoc}
 329      */
 330     public synchronized StringBuffer append(char[] str, int offset, int len) {
 331         super.append(str, offset, len);
 332         return this;
 333     }
 334 
 335     public synchronized StringBuffer append(boolean b) {
 336         super.append(b);
 337         return this;
 338     }
 339 
 340     public synchronized StringBuffer append(char c) {
 341         super.append(c);




 302         // Note, synchronization achieved via other invocations
 303         if (s == null)
 304             s = "null";
 305         if (s instanceof String)
 306             return this.append((String)s);
 307         if (s instanceof StringBuffer)
 308             return this.append((StringBuffer)s);
 309         return this.append(s, 0, s.length());
 310     }
 311 
 312     /**
 313      * @throws IndexOutOfBoundsException {@inheritDoc}
 314      * @since      1.5
 315      */
 316     public synchronized StringBuffer append(CharSequence s, int start, int end)
 317     {
 318         super.append(s, start, end);
 319         return this;
 320     }
 321 
 322     /**
 323      * @throws IllegalArgumentException {@inheritDoc}
 324      * @since 1.8
 325      */
 326     public synchronized StringBuffer append(int n, CharSequence cs) {
 327         super.append(n, cs);
 328         return this;
 329     }
 330         
 331     
 332     public synchronized StringBuffer append(char[] str) {
 333         super.append(str);
 334         return this;
 335     }
 336 
 337     /**
 338      * @throws IndexOutOfBoundsException {@inheritDoc}
 339      */
 340     public synchronized StringBuffer append(char[] str, int offset, int len) {
 341         super.append(str, offset, len);
 342         return this;
 343     }
 344 
 345     public synchronized StringBuffer append(boolean b) {
 346         super.append(b);
 347         return this;
 348     }
 349 
 350     public synchronized StringBuffer append(char c) {
 351         super.append(c);