JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / com / stevesoft / pat / wrap / StringWrap.js
1 Clazz.declarePackage ("com.stevesoft.pat.wrap");
2 Clazz.load (["com.stevesoft.pat.StringLike"], "com.stevesoft.pat.wrap.StringWrap", ["com.stevesoft.pat.wrap.StringBufferWrap"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.s = null;
5 Clazz.instantialize (this, arguments);
6 }, com.stevesoft.pat.wrap, "StringWrap", null, com.stevesoft.pat.StringLike);
7 Clazz.makeConstructor (c$, 
8 function (s) {
9 this.s = s;
10 }, "~S");
11 Clazz.overrideMethod (c$, "toString", 
12 function () {
13 return this.s;
14 });
15 Clazz.overrideMethod (c$, "charAt", 
16 function (i) {
17 return this.s.charAt (i);
18 }, "~N");
19 Clazz.overrideMethod (c$, "length", 
20 function () {
21 return this.s.length;
22 });
23 Clazz.overrideMethod (c$, "substring", 
24 function (i1, i2) {
25 return this.s.substring (i1, i2);
26 }, "~N,~N");
27 Clazz.overrideMethod (c$, "unwrap", 
28 function () {
29 return this.s;
30 });
31 Clazz.overrideMethod (c$, "newStringBufferLike", 
32 function () {
33 return  new com.stevesoft.pat.wrap.StringBufferWrap ();
34 });
35 Clazz.overrideMethod (c$, "indexOf", 
36 function (c) {
37 return this.s.indexOf (c);
38 }, "~S");
39 });