1. Project Clover database Fri Dec 6 2024 13:47:14 GMT
  2. Package com.stevesoft.pat

File Skipped.java

 

Coverage histogram

../../../img/srcFileCovDistChart0.png
60% of files have more coverage

Code metrics

2
8
6
1
55
35
8
1
1.33
6
1.33

Classes

Class
Line #
Actions
Skipped 16 8 8
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    //
2    // This software is now distributed according to
3    // the Lesser Gnu Public License. Please see
4    // http://www.gnu.org/copyleft/lesser.txt for
5    // the details.
6    // -- Happy Computing!
7    //
8    package com.stevesoft.pat;
9   
10    import java.util.Hashtable;
11   
12    /**
13    * Implements the (?<number) Pattern, where number is an integer telling us
14    * how far to back up in the Pattern. Not in perl 5.
15    */
 
16    class Skipped extends Pattern
17    {
18    String s;
19   
 
20  0 toggle Skipped(String s)
21    {
22  0 this.s = s;
23    }
24   
 
25  0 toggle public String toString()
26    {
27  0 return s + nextString();
28    }
29   
 
30  0 toggle public int matchInternal(int pos, Pthings pt)
31    {
32    // if(pt.no_check || s.regionMatches(pt.ignoreCase,0,pt.src,pos,s.length()))
33  0 if (pt.no_check || CaseMgr.regionMatches(s, pt.ignoreCase, 0, pt.src,
34    pos, s.length()))
35    {
36  0 return nextMatch(pos + s.length(), pt);
37    }
38  0 return -1;
39    }
40   
 
41  0 toggle public patInt minChars()
42    {
43  0 return new patInt(s.length());
44    }
45   
 
46  0 toggle public patInt maxChars()
47    {
48  0 return new patInt(s.length());
49    }
50   
 
51  0 toggle Pattern clone1(Hashtable h)
52    {
53  0 return new Skipped(s);
54    }
55    };