Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
../../../../../../img/srcFileCovDistChart8.png 62% of files have more coverage
10   81   9   1.67
6   31   0.9   6
6     1.5  
1    
 
  FunctionKey       Line # 25 10 9 72.7% 0.72727275
 
  (18)
 
1    /* This file is part of the project "Hilbert II" - http://www.qedeq.org
2    *
3    * Copyright 2000-2013, Michael Meyling <mime@qedeq.org>.
4    *
5    * "Hilbert II" is free software; you can redistribute
6    * it and/or modify it under the terms of the GNU General Public
7    * License as published by the Free Software Foundation; either
8    * version 2 of the License, or (at your option) any later version.
9    *
10    * This program is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13    * GNU General Public License for more details.
14    */
15   
16    package org.qedeq.kernel.bo.logic.common;
17   
18    import org.qedeq.base.utility.EqualsUtility;
19   
20    /**
21    * Function constant key, describing a function constant.
22    *
23    * @author Michael Meyling
24    */
 
25    public final class FunctionKey {
26   
27    /** Function name. */
28    private String name;
29   
30    /** Function argument number. */
31    private String arguments;
32   
33    /**
34    * Constructor.
35    *
36    * @param name Function name.
37    * @param arguments Function argument number.
38    */
 
39  25194 toggle public FunctionKey(final String name, final String arguments) {
40  25194 this.name = name;
41  25194 this.arguments = arguments;
42    }
43   
44    /**
45    * Get function name.
46    *
47    * @return Function name.
48    */
 
49  166402 toggle public String getName() {
50  166402 return name;
51    }
52   
53    /**
54    * Get function argument number.
55    *
56    * @return Number of arguments.
57    */
 
58  165358 toggle public String getArguments() {
59  165358 return arguments;
60    }
61   
 
62  45944 toggle public int hashCode() {
63  45944 return (getName() != null ? getName().hashCode() : 0)
64  45944 ^ (getArguments() != null ? getArguments().hashCode() : 0);
65    }
66   
 
67  24130 toggle public boolean equals(final Object obj) {
68  24130 if (!(obj instanceof FunctionKey)) {
69  0 return false;
70    }
71  24130 final FunctionKey other = (FunctionKey) obj;
72  24130 return EqualsUtility.equals(getName(), other.getName())
73    && EqualsUtility.equals(getArguments(), other.getArguments());
74    }
75   
 
76  0 toggle public String toString() {
77  0 return getName() + "[" + getArguments() + "]";
78    }
79   
80   
81    }