EMMA Coverage Report (generated Fri Feb 14 08:28:31 UTC 2014)
[all classes][org.qedeq.kernel.bo.logic.common]

COVERAGE SUMMARY FOR SOURCE FILE [SubjectVariable.java]

nameclass, %method, %block, %line, %
SubjectVariable.java100% (1/1)40%  (2/5)60%  (18/30)60%  (6/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SubjectVariable100% (1/1)40%  (2/5)60%  (18/30)60%  (6/10)
getName (): String 0%   (0/1)0%   (0/3)0%   (0/1)
hashCode (): int 0%   (0/1)0%   (0/4)0%   (0/1)
toString (): String 0%   (0/1)0%   (0/3)0%   (0/1)
equals (Object): boolean 100% (1/1)86%  (12/14)75%  (3/4)
SubjectVariable (String): void 100% (1/1)100% (6/6)100% (3/3)

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 
16package org.qedeq.kernel.bo.logic.common;
17 
18import org.qedeq.base.utility.EqualsUtility;
19 
20/**
21 * One subject variable. This class is mainly used in the model area.
22 * For this kernel he normal form of a subject variable is an
23 * {@link org.qedeq.kernel.se.base.list.ElementList}
24 * with an {@link org.qedeq.kernel.se.base.list.Atom} with the name of the subject variable.
25 *
26 * @author  Michael Meyling
27 */
28public class SubjectVariable {
29 
30    /** Text to identify the subject variable. */
31    private final String name;
32 
33    /**
34     * Constructor.
35     *
36     * @param   name        Show this to represent the subject variable within outputs.
37     */
38    public SubjectVariable(final String name) {
39        this.name = name;
40    }
41 
42    /**
43     * Get subject variable name.
44     *
45     * @return  Subject variable name.
46     */
47    public String getName() {
48        return name;
49    }
50 
51    public int hashCode() {
52        return name.hashCode();
53    }
54 
55    public boolean equals(final Object other) {
56        if (!(other instanceof SubjectVariable)) {
57            return false;
58        }
59        final SubjectVariable var = (SubjectVariable) other;
60        return EqualsUtility.equals(name, var.name);
61    }
62 
63    public String toString() {
64        return name;
65    }
66 
67}

[all classes][org.qedeq.kernel.bo.logic.common]
EMMA 2.1.5320 (stable) (C) Vladimir Roubtsov