JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / com / stevesoft / pat / End.js
1 Clazz.declarePackage ("com.stevesoft.pat");
2 Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.End", ["com.stevesoft.pat.patInt"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.retIsEnd = false;
5 Clazz.instantialize (this, arguments);
6 }, com.stevesoft.pat, "End", com.stevesoft.pat.Pattern);
7 Clazz.makeConstructor (c$, 
8 function (b) {
9 Clazz.superConstructor (this, com.stevesoft.pat.End, []);
10 this.retIsEnd = b;
11 }, "~B");
12 Clazz.overrideMethod (c$, "matchInternal", 
13 function (pos, pt) {
14 if (this.retIsEnd && pt.mFlag && pos < pt.src.length ()) {
15 if (pt.src.charAt (pos) == '\n') {
16 return this.nextMatch (pos, pt);
17 }}if (pt.src.length () == pos) {
18 return this.nextMatch (pos, pt);
19 } else if (pos < pt.src.length ()) {
20 pt.src.charAt (pos);
21 }return -1;
22 }, "~N,com.stevesoft.pat.Pthings");
23 Clazz.overrideMethod (c$, "toString", 
24 function () {
25 if (this.retIsEnd) {
26 return "$";
27 } else {
28 return "\\Z";
29 }});
30 Clazz.overrideMethod (c$, "maxChars", 
31 function () {
32 return  new com.stevesoft.pat.patInt (1);
33 });
34 Clazz.overrideMethod (c$, "clone1", 
35 function (h) {
36 return  new com.stevesoft.pat.End (this.retIsEnd);
37 }, "java.util.Hashtable");
38 });