Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / com / stevesoft / pat / StringRule.js
1 Clazz.declarePackage ("com.stevesoft.pat");
2 Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.StringRule", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.s = null;
5 Clazz.instantialize (this, arguments);
6 }, com.stevesoft.pat, "StringRule", com.stevesoft.pat.ReplaceRule);
7 Clazz.makeConstructor (c$, 
8 function (s) {
9 Clazz.superConstructor (this, com.stevesoft.pat.StringRule, []);
10 this.s = s;
11 }, "~S");
12 Clazz.overrideMethod (c$, "apply", 
13 function (sb, res) {
14 sb.append (this.s);
15 }, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes");
16 Clazz.overrideMethod (c$, "toString1", 
17 function () {
18 return this.s;
19 });
20 Clazz.overrideMethod (c$, "clone1", 
21 function () {
22 return  new com.stevesoft.pat.StringRule (this.s);
23 });
24 });