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
ProofVo.java 100% 100% 100% 100%
coverage
 1    /* $Id: ProofVo.java,v 1.4 2006/10/20 20:23:01 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.dto.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
 29    *
 30    * @version $Revision: 1.4 $
 31    * @author Michael Meyling
 32    */
 33    public final class ProofVo implements Proof {
 34   
 35    /** LaTeX text for non formal proof. */
 36    private LatexList nonFormalProof;
 37   
 38    /**
 39    * Constructs an empty proof.
 40    */
 41  97 public ProofVo() {
 42    // nothing to do
 43    }
 44   
 45    /**
 46    * Set LaTeX text for non formal proof.
 47    *
 48    * @param nonFormalProof
 49    */
 50  89 public final void setNonFormalProof(final LatexList nonFormalProof) {
 51  89 this.nonFormalProof = nonFormalProof;
 52    }
 53   
 54  518 public final LatexList getNonFormalProof() {
 55  518 return nonFormalProof;
 56    }
 57   
 58  113 public boolean equals(final Object obj) {
 59  113 if (!(obj instanceof ProofVo)) {
 60  6 return false;
 61    }
 62  107 final ProofVo other = (ProofVo) obj;
 63  107 return EqualsUtility.equals(getNonFormalProof(), other.getNonFormalProof());
 64    }
 65   
 66  95 public int hashCode() {
 67  95 return (getNonFormalProof() != null ? getNonFormalProof().hashCode() : 0);
 68    }
 69   
 70  78 public String toString() {
 71  78 return "Proof: " + getNonFormalProof();
 72    }
 73   
 74    }