Clover coverage report - QedeqKernelSe Coverage Report
Coverage timestamp: Do Mai 10 2007 03:16:40 CEST
file stats: LOC: 110   Methods: 10
NCLOC: 46   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ProofVo.java 100% 100% 100% 100%
coverage
 1    /* $Id: ProofVo.java,v 1.7 2007/05/10 00:37:50 m31 Exp $
 2    *
 3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
 4    *
 5    * Copyright 2000-2007, 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    * LATER mime 20050220: add formal proof
 29    *
 30    * @version $Revision: 1.7 $
 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  160 public ProofVo() {
 48    // nothing to do
 49    }
 50   
 51  594 public String getKind() {
 52  594 return kind;
 53    }
 54   
 55    /**
 56    * Set kind of proof. E.g. "informal".
 57    *
 58    * @param kind Set proof type.
 59    */
 60  142 public final void setKind(final String kind) {
 61  142 this.kind = kind;
 62    }
 63   
 64  596 public String getLevel() {
 65  596 return level;
 66    }
 67   
 68    /**
 69    * Set proof level. Higher proof levels contain more detailed proofs.
 70    *
 71    * @param level Proof level.
 72    */
 73  142 public final void setLevel(final String level) {
 74  142 this.level = level;
 75    }
 76   
 77    /**
 78    * Set LaTeX text for non formal proof.
 79    *
 80    * @param nonFormalProof
 81    */
 82  142 public final void setNonFormalProof(final LatexList nonFormalProof) {
 83  142 this.nonFormalProof = nonFormalProof;
 84    }
 85   
 86  891 public final LatexList getNonFormalProof() {
 87  891 return nonFormalProof;
 88    }
 89   
 90  137 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  113 public int hashCode() {
 101  113 return (getKind() != null ? getKind().hashCode() : 0)
 102  113 ^ (getLevel() != null ? 1 ^ getLevel().hashCode() : 0)
 103  113 ^ (getNonFormalProof() != null ? 2 ^ getNonFormalProof().hashCode() : 0);
 104    }
 105   
 106  84 public String toString() {
 107  84 return "Proof (" + getKind() + ", " + getLevel() + "): " + getNonFormalProof();
 108    }
 109   
 110    }