it.sauronsoftware.feed4j.bean
Class Feed

java.lang.Object
  extended by it.sauronsoftware.feed4j.bean.Feed

public class Feed
extends java.lang.Object

This class is used to represent a parsed feed in an object oriented way.

Author:
Carlo Pelliccia

Constructor Summary
Feed()
           
 
Method Summary
 void addItem(FeedItem item)
          This method adds an item to the feed.
 FeedHeader getHeader()
          This method returns the feed header.
 FeedItem getItem(int index)
          This method returns a feed item.
 int getItemCount()
          This method returns the number of the items in the feed.
 void setHeader(FeedHeader header)
          This method sets the feed header.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Feed

public Feed()
Method Detail

getHeader

public FeedHeader getHeader()
This method returns the feed header.

Returns:
The feed header.

setHeader

public void setHeader(FeedHeader header)
This method sets the feed header.

Parameters:
header - The feed header.

addItem

public void addItem(FeedItem item)
This method adds an item to the feed.

Parameters:
item - The item.

getItem

public FeedItem getItem(int index)
                 throws java.lang.IndexOutOfBoundsException
This method returns a feed item.

Parameters:
index - The item index.
Returns:
The feed item.
Throws:
java.lang.IndexOutOfBoundsException - Thrown if the index supplied is not valid (index is expected to be greater or equal to 0 and less than the value returned by getItemsCount()).

getItemCount

public int getItemCount()
This method returns the number of the items in the feed.

Returns:
The number of the items in the feed.