Clover icon

Coverage Report

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

File CustomEndpoint.java

 

Coverage histogram

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

Code metrics

2
7
4
1
44
27
5
0.71
1.75
4
1.25

Classes

Class Line # Actions
CustomEndpoint 16 7 5
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    * This class is needed internally to make backtracking work correctly in
14    * user-defined patterns.
15    */
 
16    class CustomEndpoint extends Pattern
17    {
18    Custom c;
19   
 
20  0 toggle CustomEndpoint(Custom cm)
21    {
22  0 c = cm;
23    }
24   
 
25  0 toggle public int matchInternal(int pos, Pthings pt)
26    {
27  0 int npos = c.v.validate(pt.src, c.start, pos);
28  0 if (npos >= 0)
29    {
30  0 return nextMatch(npos, pt);
31    }
32  0 return -1;
33    }
34   
 
35  0 toggle public String toString()
36    {
37  0 return "";
38    }
39   
 
40  0 toggle Pattern clone1(Hashtable h)
41    {
42  0 return new CustomEndpoint((Custom) c.clone(h));
43    }
44    }