EMMA Coverage Report (generated Fri Feb 14 08:28:31 UTC 2014)
[all classes][org.qedeq.kernel.bo.service.unicode]

COVERAGE SUMMARY FOR SOURCE FILE [ProofLineData.java]

nameclass, %method, %block, %line, %
ProofLineData.java100% (1/1)83%  (10/12)51%  (54/105)60%  (18/30)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ProofLineData100% (1/1)83%  (10/12)51%  (54/105)60%  (18/30)
ProofLineData (ProofLineData): void 0%   (0/1)0%   (0/39)0%   (0/7)
ProofLineData (String, String [], String []): void 0%   (0/1)0%   (0/12)0%   (0/5)
ProofLineData (): void 100% (1/1)100% (5/5)100% (3/3)
containsData (): boolean 100% (1/1)100% (8/8)100% (1/1)
getFormula (): String [] 100% (1/1)100% (3/3)100% (1/1)
getLineLabel (): String 100% (1/1)100% (3/3)100% (1/1)
getReason (): String [] 100% (1/1)100% (3/3)100% (1/1)
init (): void 100% (1/1)100% (12/12)100% (4/4)
lines (): int 100% (1/1)100% (8/8)100% (1/1)
setFormula (String []): void 100% (1/1)100% (4/4)100% (2/2)
setLineLabel (String): void 100% (1/1)100% (4/4)100% (2/2)
setReason (String []): void 100% (1/1)100% (4/4)100% (2/2)

1/* This file is part of the project "Hilbert II" - http://www.qedeq.org
2 *
3 * Copyright 2000-2014,  Michael Meyling <mime@qedeq.org>.
4 *
5 * "Hilbert II" is free software; you can redistribute
6 * it and/or modify it under the terms of the GNU General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15 
16package org.qedeq.kernel.bo.service.unicode;
17 
18 
19/**
20 * Contains printing data for a formal proof line.
21 *
22 * @author  Michael Meyling
23 */
24public class ProofLineData {
25 
26    /** Current Label of formal proof line. */
27    private String lineLabel;
28 
29    /** String representation of formal proof line formula. */
30    private String[] formula;
31 
32    /** String representation of formal proof line reason. */
33    private String[] reason;
34 
35    /**
36     * Constructs empty container.
37     */
38    public ProofLineData() {
39        init();
40    }
41 
42    /**
43     * Construct new proof line data.
44     *
45     * @param   lineLabel   Proof line label.
46     * @param   formula     Formula strings.
47     * @param   reason      Reason strings.
48     */
49    public ProofLineData(final String lineLabel, final String[] formula, final String[] reason) {
50        this.lineLabel = lineLabel;
51        this.formula = formula;
52        this.reason = reason;
53    }
54 
55    /**
56     * Copy constructor.
57     *
58     * @param   lineData    Existing object.
59     */
60    public ProofLineData(final ProofLineData lineData) {
61        this.lineLabel = lineData.lineLabel;
62        this.formula = new String[lineData.formula.length];
63        System.arraycopy(lineData.formula, 0, this.formula, 0, lineData.formula.length);
64        this.reason = new String[lineData.reason.length];
65        System.arraycopy(lineData.reason, 0, this.reason, 0, lineData.reason.length);
66    }
67 
68    /**
69     * Empty data.
70     */
71    public void init() {
72        this.lineLabel = "";
73        this.formula = new String[0];
74        this.reason = new String[0];
75    }
76 
77    /**
78     * Exists formula data or reason data?
79     *
80     * @return  Is there any reason or formula data?
81     */
82    public boolean containsData() {
83        return (0 != lines());
84    }
85 
86    /**
87     * How many lines do we have? This is maximum of formula lines and reason lines.
88     *
89     * @return  Number of lines.
90     */
91    public int lines() {
92        return Math.max(getFormula().length, getReason().length);
93    }
94 
95    /**
96     * Get label for proof line.
97     *
98     * @return  Proof line label.
99     */
100    public String getLineLabel() {
101        return lineLabel;
102    }
103 
104    /**
105     * Set label for proof line.
106     *
107     * @param   lineLabel   Proof line label.
108     */
109    public void setLineLabel(final String lineLabel) {
110        this.lineLabel = lineLabel;
111    }
112 
113    /**
114     * Get proof line formula.
115     *
116     * @return  Proof line formula.
117     */
118    public String[] getFormula() {
119        return formula;
120    }
121 
122    /**
123     * Set proof line formula.
124     *
125     * @param  formula  Proof line formula.
126     */
127    public void setFormula(final String[] formula) {
128        this.formula = formula;
129    }
130 
131    /**
132     * Get derive reason for proof line. Already formatted in several lines.
133     *
134     * @return  Reason for getting this proof line.
135     */
136    public String[] getReason() {
137        return reason;
138    }
139 
140    /**
141     * Set derive reason for proof line.
142     *
143     * @param  reason   Reason for getting this proof line. Must be already formatted in serveral
144     *                  lines.
145     */
146    public void setReason(final String[] reason) {
147        this.reason = reason;
148    }
149 
150}

[all classes][org.qedeq.kernel.bo.service.unicode]
EMMA 2.1.5320 (stable) (C) Vladimir Roubtsov