Clover coverage report - QedeqKernelSe Coverage Report
Coverage timestamp: Sa Jan 26 2008 14:11:34 CET
file stats: LOC: 84   Methods: 6
NCLOC: 31   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
Function.java 50% 80% 83,3% 72,7%
coverage coverage
 1    /* $Id: Function.java,v 1.1 2008/01/26 12:39:09 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.bo.logic;
 19   
 20    import org.qedeq.kernel.utility.EqualsUtility;
 21   
 22    /**
 23    * Function constant key, describing a function constant.
 24    *
 25    * @version $Revision: 1.1 $
 26    * @author Michael Meyling
 27    */
 28    public final class Function {
 29   
 30    /** Function name. */
 31    private String name;
 32   
 33    /** Function argument number. */
 34    private String arguments;
 35   
 36    /**
 37    * Constructor.
 38    *
 39    * @param name Function name.
 40    * @param arguments Function argument number.
 41    */
 42  1632 public Function(final String name, final String arguments) {
 43  1632 this.name = name;
 44  1632 this.arguments = arguments;
 45    }
 46   
 47    /**
 48    * Get function name.
 49    *
 50    * @return Function name.
 51    */
 52  6336 public String getName() {
 53  6336 return name;
 54    }
 55   
 56    /**
 57    * Get function argument number.
 58    *
 59    * @return Number of arguments.
 60    */
 61  6336 public String getArguments() {
 62  6336 return arguments;
 63    }
 64   
 65  1728 public int hashCode() {
 66  1728 return (getName() != null ? getName().hashCode() : 0)
 67  1728 ^ (getArguments() != null ? getArguments().hashCode() : 0);
 68    }
 69   
 70  1440 public boolean equals(final Object obj) {
 71  1440 if (!(obj instanceof Function)) {
 72  0 return false;
 73    }
 74  1440 final Function other = (Function) obj;
 75  1440 return EqualsUtility.equals(getName(), other.getName())
 76    && EqualsUtility.equals(getArguments(), other.getArguments());
 77    }
 78   
 79  0 public String toString() {
 80  0 return getName() + "[" + getArguments() + "]";
 81    }
 82   
 83   
 84    }