1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.sun.syndication.feed.rss;
18
19 import com.sun.syndication.feed.impl.ObjectBean;
20
21 import java.io.Serializable;
22
23 /***
24 * Bean for item descriptions of RSS feeds.
25 * <p>
26 * @author Alejandro Abdelnur
27 *
28 */
29 public class Description implements Cloneable,Serializable {
30 private ObjectBean _objBean;
31 private String _type;
32 private String _value;
33
34 /***
35 * Default constructor. All properties are set to <b>null</b>.
36 * <p>
37 *
38 */
39 public Description() {
40 _objBean = new ObjectBean(this.getClass(),this);
41 }
42
43 /***
44 * Creates a deep 'bean' clone of the object.
45 * <p>
46 * @return a clone of the object.
47 * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
48 *
49 */
50 public Object clone() throws CloneNotSupportedException {
51 return _objBean.clone();
52 }
53
54 /***
55 * Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
56 * <p>
57 * @param other he reference object with which to compare.
58 * @return <b>true</b> if 'this' object is equal to the 'other' object.
59 *
60 */
61 public boolean equals(Object other) {
62 return _objBean.equals(other);
63 }
64
65 /***
66 * Returns a hashcode value for the object.
67 * <p>
68 * It follows the contract defined by the Object hashCode() method.
69 * <p>
70 * @return the hashcode of the bean object.
71 *
72 */
73 public int hashCode() {
74 return _objBean.hashCode();
75 }
76
77 /***
78 * Returns the String representation for the object.
79 * <p>
80 * @return String representation for the object.
81 *
82 */
83 public String toString() {
84 return _objBean.toString();
85 }
86
87 /***
88 * Returns the description type.
89 * <p>
90 * @return the description type, <b>null</b> if none.
91 *
92 */
93 public String getType() {
94 return _type;
95 }
96
97 /***
98 * Sets the description type.
99 * <p>
100 * @param type the description type to set, <b>null</b> if none.
101 *
102 */
103 public void setType(String type) {
104 _type = type;
105 }
106
107 /***
108 * Returns the description value.
109 * <p>
110 * @return the description value, <b>null</b> if none.
111 *
112 */
113 public String getValue() {
114 return _value;
115 }
116
117 /***
118 * Sets the description value.
119 * <p>
120 * @param value the description value to set, <b>null</b> if none.
121 *
122 */
123 public void setValue(String value) {
124 _value = value;
125 }
126
127 }