Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
../../../../../../img/srcFileCovDistChart8.png 62% of files have more coverage
10   80   9   1.67
6   31   0.9   6
6     1.5  
1    
 
  PredicateKey       Line # 25 10 9 72.7% 0.72727275
 
  (61)
 
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    * Predicate constant key, describing a predicate constant.
22    *
23    * @author Michael Meyling
24    */
 
25    public final class PredicateKey {
26   
27    /** Predicate name. */
28    private String name;
29   
30    /** Predicate argument number. */
31    private String arguments;
32   
33    /**
34    * Constructor.
35    *
36    * @param name Predicate name.
37    * @param arguments Predicate argument number.
38    */
 
39  116969 toggle public PredicateKey(final String name, final String arguments) {
40  116969 this.name = name;
41  116969 this.arguments = arguments;
42    }
43   
44    /**
45    * Get predicate name.
46    *
47    * @return Predicate name.
48    */
 
49  453653 toggle public String getName() {
50  453653 return name;
51    }
52   
53    /**
54    * Get predicate argument number.
55    *
56    * @return Number of arguments.
57    */
 
58  453980 toggle public String getArguments() {
59  453980 return arguments;
60    }
61   
 
62  119721 toggle public int hashCode() {
63  119721 return (getName() != null ? getName().hashCode() : 0)
64  119721 ^ (getArguments() != null ? getArguments().hashCode() : 0);
65    }
66   
 
67  47697 toggle public boolean equals(final Object obj) {
68  47697 if (!(obj instanceof PredicateKey)) {
69  0 return false;
70    }
71  47697 final PredicateKey other = (PredicateKey) obj;
72  47697 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    }