rss.adt
Class Feed

java.lang.Object
  extended by rss.adt.Feed
All Implemented Interfaces:
java.io.Serializable

public final class Feed
extends java.lang.Object
implements java.io.Serializable

Abstract data type corresponding with RSS Feeds.

Abstraction Function:



Representation Invariant: id must be a unique, positive identifier over all Feeds title, descript, author, lastUpdated, lastViewed, nickname, icon must not be null

Author:
Jong-Moon Kim, Karl Rieb, Lydia Chilton
See Also:
Serialized Form

Constructor Summary
Feed(int id, java.lang.String title, java.lang.String descript, java.util.List<java.lang.String> author, java.lang.String link, java.util.Date lastUpdated, java.util.Date lastViewed, java.lang.String nickname, java.lang.String icon)
          Instantiates a new Feed object with the given parameters
 
Method Summary
 boolean equals(java.lang.Object o)
          Two Feeds are equal only when they are both base feeds and the URI of one equals the URI of the other
 java.util.List<java.lang.String> getAuthor()
          Accessor for the author(s) of the feed
 java.lang.String getDescript()
          Accessor for the description of feed
 java.lang.String getIcon()
          Accessor for the path of icon graphic
 int getId()
          Accessor for the unique identifier of the feed
 java.util.Date getLastUpdated()
          Accessor for the last downloaded date
 java.util.Date getLastViewed()
          Accessor for the last viewed date
 java.lang.String getLink()
          Accessor for the URI of the feed
 java.lang.String getNickname()
          Accessor for the Nickname of the feed
 java.lang.String getTitle()
          Accessor for the title of the feed
 int hashCode()
          HashCode generator for unique storage in HashTables
 void setAuthor(java.util.List<java.lang.String> author)
          Modifier for the author(s) of the feed
 void setDescript(java.lang.String descript)
          Modifier for the description of feed
 void setIcon(java.lang.String icon)
          Modifier to set the path to the icon graphic
 void setLastUpdated(java.util.Date lastUpdated)
          Modifier for the last downloaded date
 void setLastViewed(java.util.Date lastViewed)
          Modifier for the last viewed date
 void setNickname(java.lang.String nickname)
          Modifier for the Nickname of the feed
 void setTitle(java.lang.String title)
          Modifier for the title of the feed
 java.lang.String toString()
          Method for displaying internal state for debugging purposes
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Feed

public Feed(int id,
            java.lang.String title,
            java.lang.String descript,
            java.util.List<java.lang.String> author,
            java.lang.String link,
            java.util.Date lastUpdated,
            java.util.Date lastViewed,
            java.lang.String nickname,
            java.lang.String icon)
Instantiates a new Feed object with the given parameters

Parameters:
id - Unique identifier of the feed
title - Title
descript - Description of feed
author - Author(s) of feed
link - URI
lastUpdated - When feed was last downloaded
lastViewed - When feed was last viewed
nickname - Custom name of feed
icon - Path of icon image
Method Detail

getAuthor

public java.util.List<java.lang.String> getAuthor()
Accessor for the author(s) of the feed

Returns:
Authors of feed

setAuthor

public void setAuthor(java.util.List<java.lang.String> author)
Modifier for the author(s) of the feed

Parameters:
author - Author(s) of feed

getDescript

public java.lang.String getDescript()
Accessor for the description of feed

Returns:
descript Description of feed

setDescript

public void setDescript(java.lang.String descript)
Modifier for the description of feed

Parameters:
descript - Description of feed

getIcon

public java.lang.String getIcon()
Accessor for the path of icon graphic

Returns:
path of icon graphic

setIcon

public void setIcon(java.lang.String icon)
Modifier to set the path to the icon graphic

Parameters:
icon - path of icon graphic

getLastUpdated

public java.util.Date getLastUpdated()
Accessor for the last downloaded date

Returns:
last downloaded date

setLastUpdated

public void setLastUpdated(java.util.Date lastUpdated)
Modifier for the last downloaded date

Parameters:
lastUpdated - last downloaded date

getLastViewed

public java.util.Date getLastViewed()
Accessor for the last viewed date

Returns:
last viewed date

setLastViewed

public void setLastViewed(java.util.Date lastViewed)
Modifier for the last viewed date

Parameters:
lastViewed -

getLink

public java.lang.String getLink()
Accessor for the URI of the feed

Returns:
URI

getNickname

public java.lang.String getNickname()
Accessor for the Nickname of the feed

Returns:
nickname

setNickname

public void setNickname(java.lang.String nickname)
Modifier for the Nickname of the feed

Parameters:
nickname - nickname

getTitle

public java.lang.String getTitle()
Accessor for the title of the feed

Returns:
title of feed

setTitle

public void setTitle(java.lang.String title)
Modifier for the title of the feed

Parameters:
title - of feed

getId

public int getId()
Accessor for the unique identifier of the feed

Returns:
unique identifier of feed

toString

public java.lang.String toString()
Method for displaying internal state for debugging purposes

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
HashCode generator for unique storage in HashTables

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Two Feeds are equal only when they are both base feeds and the URI of one equals the URI of the other

Overrides:
equals in class java.lang.Object