Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / lang / StringBuffer.js
1 Clazz.load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){
2 c$=Clazz.declareType(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]);
3 Clazz.makeConstructor(c$,
4 function(cs){
5 if(cs==null){
6 throw new NullPointerException();
7 }
8 Clazz.superConstructor(this,StringBuffer,[cs.toString()]);
9 },"CharSequence");
10 Clazz.defineMethod(c$,"append",
11 function(b){
12 return this.append(b?"true":"false");
13 },"~B");
14 Clazz.defineMethod(c$,"append",
15 function(ch){
16 this.append0(ch);
17 return this;
18 },"~N");
19 Clazz.defineMethod(c$,"append",
20 function(d){
21 return this.append(Double.toString(d));
22 },"~N");
23 Clazz.defineMethod(c$,"append",
24 function(obj){
25 if(obj==null){
26 this.appendNull();
27 }else{
28 this.append0(obj.toString());
29 }return this;
30 },"~O");
31 Clazz.defineMethod(c$,"append",
32 function(string){
33 this.append0(string);
34 return this;
35 },"~S");
36 Clazz.defineMethod(c$,"append",
37 function(sb){
38 if(sb==null){
39 this.appendNull();
40 }else{
41 {
42 this.append0(sb.getValue(),0,sb.length());
43 }}return this;
44 },"StringBuffer");
45 Clazz.defineMethod(c$,"append",
46 function(chars){
47 this.append0(chars);
48 return this;
49 },"~A");
50 Clazz.defineMethod(c$,"append",
51 function(chars,start,length){
52 this.append0(chars,start,length);
53 return this;
54 },"~A,~N,~N");
55 Clazz.defineMethod(c$,"append",
56 function(s){
57 if(s==null){
58 this.appendNull();
59 }else{
60 this.append0(s.toString());
61 }return this;
62 },"CharSequence");
63 Clazz.defineMethod(c$,"append",
64 function(s,start,end){
65 this.append0(s,start,end);
66 return this;
67 },"CharSequence,~N,~N");
68 Clazz.defineMethod(c$,"appendCodePoint",
69 function(codePoint){
70 return this.append(Character.toChars(codePoint));
71 },"~N");
72 Clazz.defineMethod(c$,"$delete",
73 function(start,end){
74 this.delete0(start,end);
75 return this;
76 },"~N,~N");
77 Clazz.defineMethod(c$,"deleteCharAt",
78 function(location){
79 this.deleteCharAt0(location);
80 return this;
81 },"~N");
82 Clazz.defineMethod(c$,"insert",
83 function(index,ch){
84 this.insert0(index,ch);
85 return this;
86 },"~N,~N");
87 Clazz.defineMethod(c$,"insert",
88 function(index,b){
89 return this.insert(index,b?"true":"false");
90 },"~N,~B");
91 Clazz.defineMethod(c$,"insert",
92 function(index,i){
93 return this.insert(index,Integer.toString(i));
94 },"~N,~N");
95 Clazz.defineMethod(c$,"insert",
96 function(index,l){
97 return this.insert(index,Long.toString(l));
98 },"~N,~N");
99 Clazz.defineMethod(c$,"insert",
100 function(index,d){
101 return this.insert(index,Double.toString(d));
102 },"~N,~N");
103 Clazz.defineMethod(c$,"insert",
104 function(index,f){
105 return this.insert(index,Float.toString(f));
106 },"~N,~N");
107 Clazz.defineMethod(c$,"insert",
108 function(index,obj){
109 return this.insert(index,obj==null?"null":obj.toString());
110 },"~N,~O");
111 Clazz.defineMethod(c$,"insert",
112 function(index,string){
113 this.insert0(index,string);
114 return this;
115 },"~N,~S");
116 Clazz.defineMethod(c$,"insert",
117 function(index,chars){
118 this.insert0(index,chars);
119 return this;
120 },"~N,~A");
121 Clazz.defineMethod(c$,"insert",
122 function(index,chars,start,length){
123 this.insert0(index,chars,start,length);
124 return this;
125 },"~N,~A,~N,~N");
126 Clazz.defineMethod(c$,"insert",
127 function(index,s){
128 this.insert0(index,s==null?"null":s.toString());
129 return this;
130 },"~N,CharSequence");
131 Clazz.defineMethod(c$,"insert",
132 function(index,s,start,end){
133 this.insert0(index,s,start,end);
134 return this;
135 },"~N,CharSequence,~N,~N");
136 Clazz.defineMethod(c$,"replace",
137 function(start,end,string){
138 this.replace0(start,end,string);
139 return this;
140 },"~N,~N,~S");
141 Clazz.defineMethod(c$,"reverse",
142 function(){
143 this.reverse0();
144 return this;
145 });
146 Clazz.overrideMethod(c$,"subSequence",
147 function(start,end){
148 return Clazz.superCall(this,StringBuffer,"substring",[start,end]);
149 },"~N,~N");
150 });