Clover Coverage Report
Coverage timestamp: Fri Feb 14 2014 07:28:57 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
 
  (24)
 
1    /* This file is part of the project "Hilbert II" - http://www.qedeq.org
2    *
3    * Copyright 2000-2014, 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  26358 toggle public FunctionKey(final String name, final String arguments) {
40  26358 this.name = name;
41  26358 this.arguments = arguments;
42    }
43   
44    /**
45    * Get function name.
46    *
47    * @return Function name.
48    */
 
49  174726 toggle public String getName() {
50  174726 return name;
51    }
52   
53    /**
54    * Get function argument number.
55    *
56    * @return Number of arguments.
57    */
 
58  173618 toggle public String getArguments() {
59  173618 return arguments;
60    }
61   
 
62  48408 toggle public int hashCode() {
63  48408 return (getName() != null ? getName().hashCode() : 0)
64  48408 ^ (getArguments() != null ? getArguments().hashCode() : 0);
65    }
66   
 
67  25214 toggle public boolean equals(final Object obj) {
68  25214 if (!(obj instanceof FunctionKey)) {
69  0 return false;
70    }
71  25214 final FunctionKey other = (FunctionKey) obj;
72  25214 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    }