View Javadoc

1   /*
2    * Copyright 2004 Sun Microsystems, Inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   *
16   */
17  package com.sun.syndication.feed.rss;
18  
19  import com.sun.syndication.feed.impl.ObjectBean;
20  import com.sun.syndication.feed.impl.ObjectBean;
21  
22  import java.io.Serializable;
23  
24  /***
25   * Bean for text input of RSS feeds.
26   * <p>
27   * @author Alejandro Abdelnur
28   *
29   */
30  public class TextInput implements Cloneable,Serializable {
31      private ObjectBean _objBean;
32      private String _title;
33      private String _description;
34      private String _name;
35      private String _link;
36  
37      /***
38       * Default constructor. All properties are set to <b>null</b>.
39       * <p>
40       *
41       */
42      public TextInput() {
43          _objBean = new ObjectBean(this.getClass(),this);
44      }
45  
46      /***
47       * Creates a deep 'bean' clone of the object.
48       * <p>
49       * @return a clone of the object.
50       * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
51       *
52       */
53      public Object clone() throws CloneNotSupportedException {
54          return _objBean.clone();
55      }
56  
57      /***
58       * Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
59       * <p>
60       * @param other he reference object with which to compare.
61       * @return <b>true</b> if 'this' object is equal to the 'other' object.
62       *
63       */
64      public boolean equals(Object other) {
65          return _objBean.equals(other);
66      }
67  
68      /***
69       * Returns a hashcode value for the object.
70       * <p>
71       * It follows the contract defined by the Object hashCode() method.
72       * <p>
73       * @return the hashcode of the bean object.
74       *
75       */
76      public int hashCode() {
77          return _objBean.hashCode();
78      }
79  
80      /***
81       * Returns the String representation for the object.
82       * <p>
83       * @return String representation for the object.
84       *
85       */
86      public String toString() {
87          return _objBean.toString();
88      }
89  
90      /***
91       * Returns the text input title.
92       * <p>
93       * @return the text input title, <b>null</b> if none.
94       *
95       */
96      public String getTitle() {
97          return _title;
98      }
99  
100     /***
101      * Sets the text input title.
102      * <p>
103      * @param title the text input title to set, <b>null</b> if none.
104      *
105      */
106     public void setTitle(String title) {
107         _title = title;
108     }
109 
110     /***
111      * Returns the text input description.
112      * <p>
113      * @return the text input description, <b>null</b> if none.
114      *
115      */
116     public String getDescription() {
117         return _description;
118     }
119 
120     /***
121      * Sets the text input description.
122      * <p>
123      * @param description the text input description to set, <b>null</b> if none.
124      *
125      */
126     public void setDescription(String description) {
127         _description = description;
128     }
129 
130     /***
131      * Returns the text input name.
132      * <p>
133      * @return the text input name, <b>null</b> if none.
134      *
135      */
136     public String getName() {
137         return _name;
138     }
139 
140     /***
141      * Sets the text input name.
142      * <p>
143      * @param name the text input name to set, <b>null</b> if none.
144      *
145      */
146     public void setName(String name) {
147         _name = name;
148     }
149 
150     /***
151      * Returns the text input link.
152      * <p>
153      * @return the text input link, <b>null</b> if none.
154      *
155      */
156     public String getLink() {
157         return _link;
158     }
159 
160     /***
161      * Sets the text input link.
162      * <p>
163      * @param link the text input link to set, <b>null</b> if none.
164      *
165      */
166     public void setLink(String link) {
167         _link = link;
168     }
169 
170 }