Clover Coverage Report
Coverage timestamp: Sa Aug 2 2008 13:56:27 CEST
../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
12   110   11   1,2
8   46   0,92   10
10     1,1  
1    
 
  ProofVo       Line # 33 12 11 100% 1.0
 
  (22)
 
1    /* $Id: ProofVo.java,v 1.9 2008/07/26 07:59:35 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.dto.module;
19   
20    import org.qedeq.base.utility.EqualsUtility;
21    import org.qedeq.kernel.base.module.LatexList;
22    import org.qedeq.kernel.base.module.Proof;
23   
24   
25    /**
26    * Contains a proof for a proposition.
27    *
28    * LATER mime 20050220: add formal proof
29    *
30    * @version $Revision: 1.9 $
31    * @author Michael Meyling
32    */
 
33    public class ProofVo implements Proof {
34   
35    /** Kind of proof. */
36    private String kind;
37   
38    /** Proof detail level. */
39    private String level;
40   
41    /** LaTeX text for non formal proof. */
42    private LatexList nonFormalProof;
43   
44    /**
45    * Constructs an empty proof.
46    */
 
47  253 toggle public ProofVo() {
48    // nothing to do
49    }
50   
 
51  668 toggle public String getKind() {
52  668 return kind;
53    }
54   
55    /**
56    * Set kind of proof. E.g. "informal".
57    *
58    * @param kind Set proof type.
59    */
 
60  235 toggle public final void setKind(final String kind) {
61  235 this.kind = kind;
62    }
63   
 
64  672 toggle public String getLevel() {
65  672 return level;
66    }
67   
68    /**
69    * Set proof level. Higher proof levels contain more detailed proofs.
70    *
71    * @param level Proof level.
72    */
 
73  235 toggle public final void setLevel(final String level) {
74  235 this.level = level;
75    }
76   
77    /**
78    * Set LaTeX text for non formal proof.
79    *
80    * @param nonFormalProof
81    */
 
82  235 toggle public final void setNonFormalProof(final LatexList nonFormalProof) {
83  235 this.nonFormalProof = nonFormalProof;
84    }
85   
 
86  1513 toggle public final LatexList getNonFormalProof() {
87  1513 return nonFormalProof;
88    }
89   
 
90  137 toggle public boolean equals(final Object obj) {
91  137 if (!(obj instanceof ProofVo)) {
92  8 return false;
93    }
94  129 final ProofVo other = (ProofVo) obj;
95  129 return EqualsUtility.equals(getKind(), other.getKind())
96    && EqualsUtility.equals(getLevel(), other.getLevel())
97    && EqualsUtility.equals(getNonFormalProof(), other.getNonFormalProof());
98    }
99   
 
100  119 toggle public int hashCode() {
101  119 return (getKind() != null ? getKind().hashCode() : 0)
102  119 ^ (getLevel() != null ? 1 ^ getLevel().hashCode() : 0)
103  119 ^ (getNonFormalProof() != null ? 2 ^ getNonFormalProof().hashCode() : 0);
104    }
105   
 
106  90 toggle public String toString() {
107  90 return "Proof (" + getKind() + ", " + getLevel() + "): " + getNonFormalProof();
108    }
109   
110    }