01 /* This file is part of the project "Hilbert II" - http://www.qedeq.org
02 *
03 * Copyright 2000-2013, Michael Meyling <mime@qedeq.org>.
04 *
05 * "Hilbert II" is free software; you can redistribute
06 * it and/or modify it under the terms of the GNU General Public
07 * License as published by the Free Software Foundation; either
08 * version 2 of the License, or (at your option) any later version.
09 *
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
16 package org.qedeq.gui.se.tree;
17
18
19 /**
20 * Some kind of element of a Module.
21 *
22 * @author Michael Meyling
23 */
24 public final class ModuleElement {
25
26 /** Is this an {@link #ATOM}? */
27 private boolean atom = false;
28
29 /** Name of the group this element belongs to. */
30 private String listName;
31
32 /** Name of this element.*/
33 private String name;
34
35 /**
36 * Constructs a new ModuleElement object.
37 *
38 */
39 public ModuleElement() {
40 this.name = null;
41 this.listName = null;
42 this.atom = false;
43
44 }
45
46 /**
47 * Constructs a new ModuleElement object.
48 *
49 * @param name Name of this element
50 * @param listName Element belongs to this list
51 * @param atom Is this element an atom?
52 */
53 public ModuleElement(final String name, final String listName,
54 final boolean atom) {
55 this.name = name;
56 this.listName = listName;
57 this.atom = atom;
58 }
59
60 /**
61 * Get name.
62 *
63 * @return Name.
64 */
65 public final String getName() {
66 return name;
67 }
68
69 /**
70 * Set name.
71 *
72 * @param name Name.
73 */
74 public final void setName(final String name) {
75 this.name = name;
76 }
77
78 public final String toString() {
79 return super.toString() + ":" + listName + ";" + name + ";" + atom;
80 }
81
82 }
|