Clover Coverage Report
Coverage timestamp: Sa Aug 2 2008 13:56:27 CEST
../../../../img/srcFileCovDistChart5.png 74% of files have more coverage
10   100   6   1,67
0   31   0,6   6
6     1  
1    
 
  SourcePosition       Line # 30 10 6 50% 0.5
 
  (36)
 
1    /* $Id: SourcePosition.java,v 1.4 2008/05/15 21:27:48 m31 Exp $
2    *
3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
4    *
5    * Copyright 2000-2008, Michael Meyling <mime@qedeq.org>.
6    *
7    * "Hilbert II" is free software; you can redistribute
8    * it and/or modify it under the terms of the GNU General Public
9    * License as published by the Free Software Foundation; either
10    * version 2 of the License, or (at your option) any later version.
11    *
12    * This program is distributed in the hope that it will be useful,
13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15    * GNU General Public License for more details.
16    */
17   
18    package org.qedeq.kernel.common;
19   
20    import java.io.Serializable;
21    import java.net.URL;
22   
23   
24    /**
25    * Describes a file position within a text file.
26    *
27    * @version $Revision: 1.4 $
28    * @author Michael Meyling
29    */
 
30    public final class SourcePosition implements Serializable {
31   
32    /** Address of input, for identifying source. */
33    private final URL address;
34   
35    /** Line number, starting with 1. */
36    private int line;
37   
38    /** Column number, starting with 1. */
39    private int column;
40   
41    /**
42    * Constructs source position object.
43    *
44    * @param address source address
45    * @param line Line number.
46    * @param column Column number.
47    */
 
48  68565 toggle public SourcePosition(final URL address, final int line, final int column) {
49  68565 this.address = address;
50  68565 this.line = line;
51  68565 this.column = column;
52    }
53   
54    /**
55    * Constructs file position object.
56    *
57    * @param address for identifying source
58    * @param localAddress source address
59    * @param line Line number.
60    * @param column Column number.
61    */
 
62  0 toggle public SourcePosition(final URL address, final URL localAddress,
63    final int line, final int column) {
64  0 this.address = address;
65  0 this.line = line;
66  0 this.column = column;
67    }
68   
69    /**
70    * Get address (or something to identify it) of input source.
71    *
72    * @return address of input source
73    */
 
74  0 toggle public final URL getAddress() {
75  0 return this.address;
76    }
77   
78    /**
79    * Get line number, starting with 1.
80    *
81    * @return Line number.
82    */
 
83  252 toggle public final int getLine() {
84  252 return line;
85    }
86   
87    /**
88    * Get column number, starting with 1.
89    *
90    * @return column number
91    */
 
92  252 toggle public final int getColumn() {
93  252 return column;
94    }
95   
 
96  0 toggle public final String toString() {
97  0 return getAddress() + ":" + getLine() + ":" + getColumn();
98    }
99   
100    }