EMMA Coverage Report (generated Fri Feb 14 08:28:31 UTC 2014)
[all classes][org.qedeq.kernel.se.dto.module]

COVERAGE SUMMARY FOR SOURCE FILE [AuthorVo.java]

nameclass, %method, %block, %line, %
AuthorVo.java100% (1/1)100% (9/9)100% (95/95)100% (18/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AuthorVo100% (1/1)100% (9/9)100% (95/95)100% (18/18)
AuthorVo (): void 100% (1/1)100% (3/3)100% (2/2)
AuthorVo (LatexVo, String): void 100% (1/1)100% (9/9)100% (4/4)
equals (Object): boolean 100% (1/1)100% (24/24)100% (4/4)
getEmail (): String 100% (1/1)100% (3/3)100% (1/1)
getName (): Latex 100% (1/1)100% (3/3)100% (1/1)
hashCode (): int 100% (1/1)100% (20/20)100% (1/1)
setEmail (String): void 100% (1/1)100% (4/4)100% (2/2)
setName (LatexVo): void 100% (1/1)100% (4/4)100% (2/2)
toString (): String 100% (1/1)100% (25/25)100% (1/1)

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.se.dto.module;
17 
18import org.qedeq.base.utility.EqualsUtility;
19import org.qedeq.kernel.se.base.module.Author;
20import org.qedeq.kernel.se.base.module.Latex;
21 
22 
23/**
24 * Describes a QEDEQ module author.
25 *
26 * @author  Michael Meyling
27 */
28public class AuthorVo implements Author {
29 
30    /** Author name. */
31    private Latex name;
32 
33    /** Email address of author. */
34    private String email;
35 
36    /**
37     * Constructs an author.
38     *
39     * @param   name    Author name.
40     * @param   email   Author's email address.
41     */
42    public AuthorVo(final LatexVo name, final String email) {
43        this.name = name;
44        this.email = email;
45    }
46 
47    /**
48     * Constructs an empty author.
49     */
50    public AuthorVo() {
51        // nothing to do
52    }
53 
54    /**
55     * Set name of author.
56     *
57     * @param   name    Author name.
58     */
59    public final void setName(final LatexVo name) {
60        this.name = name;
61    }
62 
63    public final Latex getName() {
64        return name;
65    }
66 
67    /**
68     * Set author's email address.
69     *
70     * @param   email   Email address.
71     */
72    public final void setEmail(final String email) {
73        this.email = email;
74    }
75 
76    public final String getEmail() {
77        return email;
78    }
79 
80    public boolean equals(final Object obj) {
81        if (!(obj instanceof AuthorVo)) {
82            return false;
83        }
84        final AuthorVo other = (AuthorVo) obj;
85        return  EqualsUtility.equals(getName(), other.getName())
86            &&  EqualsUtility.equals(getEmail(), other.getEmail());
87    }
88 
89    public int hashCode() {
90        return (getName() != null ? getName().hashCode() : 0)
91            ^ (getEmail() != null ? 1 ^ getEmail().hashCode() : 0);
92    }
93 
94    public String toString() {
95        return getName() + (getEmail() != null ? "<" + getEmail() + ">" : "");
96    }
97 
98}

[all classes][org.qedeq.kernel.se.dto.module]
EMMA 2.1.5320 (stable) (C) Vladimir Roubtsov