Clover coverage report - QedeqKernelSe Coverage Report
Coverage timestamp: Sa Okt 21 2006 08:24:31 CEST
file stats: LOC: 74   Methods: 6
NCLOC: 28   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ProofBo.java 100% 100% 100% 100%
coverage
 1    /* $Id: ProofBo.java,v 1.3 2006/10/20 20:23:00 m31 Exp $
 2    *
 3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
 4    *
 5    * Copyright 2000-2006, 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.bo.module;
 19   
 20    import org.qedeq.kernel.base.module.LatexList;
 21    import org.qedeq.kernel.base.module.Proof;
 22    import org.qedeq.kernel.utility.EqualsUtility;
 23   
 24   
 25    /**
 26    * Contains a proof for a proposition.
 27    *
 28    * TODO mime 20050220: add formal proof (with different classes?)
 29    *
 30    * @version $Revision: 1.3 $
 31    * @author Michael Meyling
 32    */
 33    public final class ProofBo implements Proof {
 34   
 35    /** LaTeX text for non formal proof. */
 36    private LatexList nonFormalProof;
 37   
 38    /**
 39    * Constructs an empty proof.
 40    */
 41  82 public ProofBo() {
 42    // nothing to do
 43    }
 44   
 45    /**
 46    * Set LaTexText of non formal proof.
 47    *
 48    * @param nonFormalProof Non formal proof text.
 49    */
 50  74 public final void setNonFormalProof(final LatexList nonFormalProof) {
 51  74 this.nonFormalProof = nonFormalProof;
 52    }
 53   
 54  362 public final LatexList getNonFormalProof() {
 55  362 return nonFormalProof;
 56    }
 57   
 58  80 public boolean equals(final Object obj) {
 59  80 if (!(obj instanceof ProofBo)) {
 60  5 return false;
 61    }
 62  75 final ProofBo other = (ProofBo) obj;
 63  75 return EqualsUtility.equals(getNonFormalProof(), other.getNonFormalProof());
 64    }
 65   
 66  76 public int hashCode() {
 67  76 return (getNonFormalProof() != null ? getNonFormalProof().hashCode() : 0);
 68    }
 69   
 70  59 public String toString() {
 71  59 return "Proof: " + getNonFormalProof();
 72    }
 73   
 74    }