View Javadoc

1   package org.xvsm.core;
2   
3   public class ExceptionEntry extends Entry {
4   
5   	/***
6   	 * Serial Version UID.
7   	 */
8   	private static final long serialVersionUID = -8657951186076646080L;
9   
10  	/***
11  	 * the description.
12  	 */
13  	private String desription;
14  	/***
15  	 * the exception number.
16  	 */
17  	private String name;
18  
19  	/***
20  	 * Default constructor.
21  	 */
22  	public ExceptionEntry() {
23  		super();
24  		this.setEntryType(Entry.EntryTypes.EXCEPTION);
25  	}
26  
27  	/***
28  	 * Create a new ExceptionEntry.
29  	 * 
30  	 * @param desription
31  	 *            the description
32  	 * @param name
33  	 *            the name of the exception
34  	 */
35  	public ExceptionEntry(String name, String desription) {
36  		super();
37  		this.setEntryType(Entry.EntryTypes.EXCEPTION);
38  		this.desription = desription;
39  		this.name = name;
40  	}
41  
42  	@Override
43  	public Entry getFlatCopy() {
44  		return new ExceptionEntry(this.name, this.desription);
45  	}
46  
47  	/***
48  	 * @return the desription
49  	 */
50  	public String getDesription() {
51  		return desription;
52  	}
53  
54  	/***
55  	 * @param desription
56  	 *            the desription to set
57  	 */
58  	public void setDesription(String desription) {
59  		this.desription = desription;
60  	}
61  
62  	/***
63  	 * @return the name
64  	 */
65  	public String getName() {
66  		return name;
67  	}
68  
69  	/***
70  	 * @param name
71  	 *            the name to set
72  	 */
73  	public void setName(String name) {
74  		this.name = name;
75  	}
76  
77  	/***
78  	 * {@inheritDoc}
79  	 */
80  	@Override
81  	public String toString() {
82  		return this.name + ": " + this.desription;
83  	}
84  }