EMMA Coverage Report (generated Fri Feb 14 08:28:31 UTC 2014)
[all classes][org.qedeq.kernel.se.dto.module]

COVERAGE SUMMARY FOR SOURCE FILE [ConclusionVo.java]

nameclass, %method, %block, %line, %
ConclusionVo.java100% (1/1)100% (10/10)99%  (107/108)100% (21.9/22)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ConclusionVo100% (1/1)100% (10/10)99%  (107/108)100% (21.9/22)
equals (Object): boolean 100% (1/1)96%  (23/24)98%  (3.9/4)
ConclusionVo (): void 100% (1/1)100% (3/3)100% (2/2)
ConclusionVo (Formula): void 100% (1/1)100% (9/9)100% (4/4)
ConclusionVo (String, Formula): void 100% (1/1)100% (9/9)100% (4/4)
getFormula (): Formula 100% (1/1)100% (3/3)100% (1/1)
getLabel (): String 100% (1/1)100% (3/3)100% (1/1)
hashCode (): int 100% (1/1)100% (20/20)100% (1/1)
setFormula (Formula): void 100% (1/1)100% (4/4)100% (2/2)
setLabel (String): void 100% (1/1)100% (4/4)100% (2/2)
toString (): String 100% (1/1)100% (29/29)100% (1/1)

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.se.dto.module;
17 
18import org.qedeq.base.utility.EqualsUtility;
19import org.qedeq.kernel.se.base.module.Conclusion;
20import org.qedeq.kernel.se.base.module.Formula;
21 
22 
23/**
24 * Conclusion that is derived from an an assumption within a proof.
25 *
26 * @author  Michael Meyling
27 */
28public class ConclusionVo implements Conclusion {
29 
30    /** Label for back references. Might be <code>null</code>. */
31    private String label;
32 
33    /** Derived formula. */
34    private Formula formula;
35 
36    /**
37     * Constructs an proof line.
38     *
39     * @param   formula     New derived formula.
40     */
41    public ConclusionVo(final Formula formula) {
42        this.label = null;
43        this.formula = formula;
44    }
45 
46    /**
47     * Constructs an proof line.
48     *
49     * @param   label       Label for back references. Might be <code>null</code>.
50     * @param   formula     New derived formula.
51     */
52    public ConclusionVo(final String label, final Formula formula) {
53        this.label = label;
54        this.formula = formula;
55    }
56 
57    /**
58     * Default constructor.
59     */
60    public ConclusionVo() {
61        // nothing to do
62    }
63 
64    public Formula getFormula() {
65        return formula;
66    }
67 
68    /**
69     * Set proof line formula.
70     *
71     * @param   formula Set formula.
72     */
73    public void setFormula(final Formula formula) {
74        this.formula = formula;
75    }
76 
77    public String getLabel() {
78        return label;
79    }
80 
81    /**
82     * Set label for proof line.
83     *
84     * @param   label   Set this label.
85     */
86    public void setLabel(final String label) {
87        this.label = label;
88    }
89 
90    public boolean equals(final Object obj) {
91        if (!(obj instanceof ConclusionVo)) {
92            return false;
93        }
94        final ConclusionVo other = (ConclusionVo) obj;
95        return  EqualsUtility.equals(label, other.label)
96          && EqualsUtility.equals(formula, other.formula);
97    }
98 
99    public int hashCode() {
100        return (label != null ? label.hashCode() : 0)
101           ^ (formula != null ?  1 ^ formula.hashCode() : 0);
102    }
103 
104    public String toString() {
105        return (label != null ? "[" + label + "] " : "    ") + getFormula() + " "
106            + "Conclusion";
107    }
108 
109}

[all classes][org.qedeq.kernel.se.dto.module]
EMMA 2.1.5320 (stable) (C) Vladimir Roubtsov