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    
 
  Predicate       Line # 28 10 7 72,7% 0.72727275
 
  (16)
 
1    /* $Id: Predicate.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    * Predicate constant key, describing a predicate constant.
24    *
25    * @version $Revision: 1.1 $
26    * @author Michael Meyling
27    */
 
28    public final class Predicate {
29   
30    /** Predicate name. */
31    private String name;
32   
33    /** Predicate argument number. */
34    private String arguments;
35   
36    /**
37    * Constructor.
38    *
39    * @param name Predicate name.
40    * @param arguments Predicate argument number.
41    */
 
42  3852 toggle public Predicate(final String name, final String arguments) {
43  3852 this.name = name;
44  3852 this.arguments = arguments;
45    }
46   
47    /**
48    * Get predicate name.
49    *
50    * @return Predicate name.
51    */
 
52  15162 toggle public String getName() {
53  15162 return name;
54    }
55   
56    /**
57    * Get predicate argument number.
58    *
59    * @return Number of arguments.
60    */
 
61  15228 toggle public String getArguments() {
62  15228 return arguments;
63    }
64   
 
65  4020 toggle public int hashCode() {
66  4020 return (getName() != null ? getName().hashCode() : 0)
67  4020 ^ (getArguments() != null ? getArguments().hashCode() : 0);
68    }
69   
 
70  3510 toggle public boolean equals(final Object obj) {
71  3510 if (!(obj instanceof Predicate)) {
72  0 return false;
73    }
74  3510 final Predicate other = (Predicate) obj;
75  3510 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    }