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

nameclass, %method, %block, %line, %
LatexVo.java100% (1/1)100% (9/9)100% (85/85)100% (18/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class LatexVo100% (1/1)100% (9/9)100% (85/85)100% (18/18)
LatexVo (): void 100% (1/1)100% (3/3)100% (2/2)
LatexVo (String, String): void 100% (1/1)100% (9/9)100% (4/4)
equals (Object): boolean 100% (1/1)100% (24/24)100% (4/4)
getLanguage (): String 100% (1/1)100% (3/3)100% (1/1)
getLatex (): String 100% (1/1)100% (3/3)100% (1/1)
hashCode (): int 100% (1/1)100% (20/20)100% (1/1)
setLanguage (String): void 100% (1/1)100% (4/4)100% (2/2)
setLatex (String): void 100% (1/1)100% (4/4)100% (2/2)
toString (): String 100% (1/1)100% (15/15)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.Latex;
20 
21 
22/**
23 * LaTeX text part.
24 *
25 * @author  Michael Meyling
26 */
27public class LatexVo implements Latex {
28 
29    /** Text language. */
30    private String language;
31 
32    /** LaTeX text. */
33    private String latex;
34 
35    /**
36     * Constructs a LaTeX text part.
37     *
38     * @param language  Language of this part.
39     * @param latex     LaTeX text.
40     */
41    public LatexVo(final String language, final String latex) {
42        this.language = language;
43        this.latex = latex;
44    }
45 
46    /**
47     * Constructs an empty LaTeX text part.
48     */
49    public LatexVo() {
50        // nothing to do
51    }
52 
53    /**
54     * Set text language. Examples are <code>en</code>, <code>de</code>.
55     *
56     * @param   language    Language.
57     */
58    public final void setLanguage(final String language) {
59        this.language = language;
60    }
61 
62    public final String getLanguage() {
63        return language;
64    }
65 
66    /**
67     * Set LaTeX text.
68     *
69     * @param   latex   LaTeX text.
70     */
71    public final void setLatex(final String latex) {
72        this.latex = latex;
73    }
74 
75    public final String getLatex() {
76        return latex;
77    }
78 
79    public boolean equals(final Object obj) {
80        if (!(obj instanceof LatexVo)) {
81            return false;
82        }
83        final LatexVo other = (LatexVo) obj;
84        return  EqualsUtility.equals(getLanguage(), other.getLanguage())
85            &&  EqualsUtility.equals(getLatex(), other.getLatex());
86    }
87 
88    public int hashCode() {
89        return (getLanguage() != null ? getLanguage().hashCode() : 0)
90            ^ (getLatex() != null ? 1 ^ getLatex().hashCode() : 0);
91    }
92 
93    public String toString() {
94        return "\"" + getLanguage() + "\":" + getLatex();
95    }
96 
97}

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