Clover Coverage Report
Coverage timestamp: Sa Aug 2 2008 13:56:27 CEST
../../../../../../img/srcFileCovDistChart8.png 47% of files have more coverage
10   84   7   1,67
6   31   0,7   6
6     1,17  
1    
 
  Function       Line # 28 10 7 72,7% 0.72727275
 
  (4)
 
1    /* $Id: Function.java,v 1.1 2008/07/26 07:58:29 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.bo.logic.wf;
19   
20    import org.qedeq.base.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 toggle 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 toggle public String getName() {
53  6336 return name;
54    }
55   
56    /**
57    * Get function argument number.
58    *
59    * @return Number of arguments.
60    */
 
61  6336 toggle public String getArguments() {
62  6336 return arguments;
63    }
64   
 
65  1728 toggle public int hashCode() {
66  1728 return (getName() != null ? getName().hashCode() : 0)
67  1728 ^ (getArguments() != null ? getArguments().hashCode() : 0);
68    }
69   
 
70  1440 toggle 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 toggle public String toString() {
80  0 return getName() + "[" + getArguments() + "]";
81    }
82   
83   
84    }