001: /*
002: * Copyright 2004 Sun Microsystems, Inc.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: *
016: */
017: package com.sun.syndication.feed.rss;
018:
019: import com.sun.syndication.feed.impl.ObjectBean;
020:
021: import java.io.Serializable;
022:
023: /**
024: * Bean for text input of RSS feeds.
025: * <p>
026: * @author Alejandro Abdelnur
027: *
028: */
029: public class TextInput implements Cloneable, Serializable {
030: private ObjectBean _objBean;
031: private String _title;
032: private String _description;
033: private String _name;
034: private String _link;
035:
036: /**
037: * Default constructor. All properties are set to <b>null</b>.
038: * <p>
039: *
040: */
041: public TextInput() {
042: _objBean = new ObjectBean(this .getClass(), this );
043: }
044:
045: /**
046: * Creates a deep 'bean' clone of the object.
047: * <p>
048: * @return a clone of the object.
049: * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
050: *
051: */
052: public Object clone() throws CloneNotSupportedException {
053: return _objBean.clone();
054: }
055:
056: /**
057: * Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
058: * <p>
059: * @param other he reference object with which to compare.
060: * @return <b>true</b> if 'this' object is equal to the 'other' object.
061: *
062: */
063: public boolean equals(Object other) {
064: return _objBean.equals(other);
065: }
066:
067: /**
068: * Returns a hashcode value for the object.
069: * <p>
070: * It follows the contract defined by the Object hashCode() method.
071: * <p>
072: * @return the hashcode of the bean object.
073: *
074: */
075: public int hashCode() {
076: return _objBean.hashCode();
077: }
078:
079: /**
080: * Returns the String representation for the object.
081: * <p>
082: * @return String representation for the object.
083: *
084: */
085: public String toString() {
086: return _objBean.toString();
087: }
088:
089: /**
090: * Returns the text input title.
091: * <p>
092: * @return the text input title, <b>null</b> if none.
093: *
094: */
095: public String getTitle() {
096: return _title;
097: }
098:
099: /**
100: * Sets the text input title.
101: * <p>
102: * @param title the text input title to set, <b>null</b> if none.
103: *
104: */
105: public void setTitle(String title) {
106: _title = title;
107: }
108:
109: /**
110: * Returns the text input description.
111: * <p>
112: * @return the text input description, <b>null</b> if none.
113: *
114: */
115: public String getDescription() {
116: return _description;
117: }
118:
119: /**
120: * Sets the text input description.
121: * <p>
122: * @param description the text input description to set, <b>null</b> if none.
123: *
124: */
125: public void setDescription(String description) {
126: _description = description;
127: }
128:
129: /**
130: * Returns the text input name.
131: * <p>
132: * @return the text input name, <b>null</b> if none.
133: *
134: */
135: public String getName() {
136: return _name;
137: }
138:
139: /**
140: * Sets the text input name.
141: * <p>
142: * @param name the text input name to set, <b>null</b> if none.
143: *
144: */
145: public void setName(String name) {
146: _name = name;
147: }
148:
149: /**
150: * Returns the text input link.
151: * <p>
152: * @return the text input link, <b>null</b> if none.
153: *
154: */
155: public String getLink() {
156: return _link;
157: }
158:
159: /**
160: * Sets the text input link.
161: * <p>
162: * @param link the text input link to set, <b>null</b> if none.
163: *
164: */
165: public void setLink(String link) {
166: _link = link;
167: }
168:
169: }
|