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 [LiteratureItemVo.java]

nameclass, %method, %block, %line, %
LiteratureItemVo.java100% (1/1)100% (8/8)100% (94/94)100% (17/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class LiteratureItemVo100% (1/1)100% (8/8)100% (94/94)100% (17/17)
LiteratureItemVo (): void 100% (1/1)100% (3/3)100% (2/2)
equals (Object): boolean 100% (1/1)100% (24/24)100% (4/4)
getItem (): LatexList 100% (1/1)100% (3/3)100% (1/1)
getLabel (): String 100% (1/1)100% (3/3)100% (1/1)
hashCode (): int 100% (1/1)100% (20/20)100% (1/1)
setItem (LatexListVo): void 100% (1/1)100% (4/4)100% (2/2)
setLabel (String): void 100% (1/1)100% (4/4)100% (2/2)
toString (): String 100% (1/1)100% (33/33)100% (4/4)

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.LatexList;
20import org.qedeq.kernel.se.base.module.LiteratureItem;
21 
22 
23/**
24 * Single literature reference.
25 *
26 * @author  Michael Meyling
27 */
28public class LiteratureItemVo implements LiteratureItem {
29 
30    /** Reference to this object with this label. */
31    private String label;
32 
33    /** Reference description. */
34    private LatexList item;
35 
36    /**
37     * Constructs a new section.
38     */
39    public LiteratureItemVo() {
40        // nothing to do
41    }
42 
43    /**
44     * Set reference label for this literature reference.
45     *
46     * @param   label   Reference to this object with this label.
47     */
48    public final void setLabel(final String label) {
49        this.label = label;
50    }
51 
52    public final String getLabel() {
53        return label;
54    }
55 
56    /**
57     * Set literature reference for this item.
58     *
59     * @param   item   literature reference.
60     */
61    public final void setItem(final LatexListVo item) {
62        this.item = item;
63    }
64 
65    public final LatexList getItem() {
66        return item;
67    }
68 
69    public boolean equals(final Object obj) {
70        if (!(obj instanceof LiteratureItemVo)) {
71            return false;
72        }
73        final LiteratureItemVo other = (LiteratureItemVo) obj;
74        return EqualsUtility.equals(getLabel(), other.getLabel())
75            && EqualsUtility.equals(getItem(), other.getItem());
76    }
77 
78    public int hashCode() {
79        return (getLabel() != null ? getLabel().hashCode() : 0)
80            ^ (getItem() != null ? 3 ^ getItem().hashCode() : 0);
81    }
82 
83    public String toString() {
84        final StringBuffer buffer = new StringBuffer();
85        buffer.append("Item label: " + label + "\n");
86        buffer.append(getItem() + "\n");
87        return buffer.toString();
88    }
89 
90}

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