Clover icon

Coverage Report

  1. Project Clover database Thu Nov 28 2024 18:06:40 GMT
  2. Package com.stevesoft.pat

File RBuffer.java

 

Coverage histogram

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

Code metrics

4
8
4
1
52
34
6
0.75
2
4
1.5

Classes

Class Line # Actions
RBuffer 13 8 6
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    /**
11    * This class is used internally by RegexReader to store blocks of data.
12    */
 
13    class RBuffer
14    {
15    boolean done = false;
16   
17    StringBuffer sb;
18   
19    int pos, epos;
20   
21    RBuffer next;
22   
 
23  0 toggle RBuffer()
24    {
25    }
26   
 
27  0 toggle RBuffer(StringBuffer sb)
28    {
29  0 this.sb = sb;
30    }
31   
 
32  0 toggle public String toString()
33    {
34  0 return "sb=" + sb.toString().replace('\n', ' ') + " pos=" + pos
35    + " epos=" + epos + " sb.length()=" + sb.length() + "\n"
36    + sp(pos + 3) + "^" + sp(epos - pos - 1) + "^";
37    }
38   
 
39  0 toggle String sp(int n)
40    {
41  0 if (n <= 0)
42    {
43  0 return "";
44    }
45  0 StringBuffer sb = new StringBuffer(n);
46  0 for (int i = 0; i < n; i++)
47    {
48  0 sb.append(' ');
49    }
50  0 return sb.toString();
51    }
52    }