bir
Class Page

java.lang.Object
  extended by bir.Page

public class Page
extends java.lang.Object

Page holds the information for a basic page: URL, title, snippet (if available) and content. Content is lazily downloaded when required.


Constructor Summary
Page(java.lang.String url, java.lang.String title, java.lang.String snippet)
           
Page(java.lang.String url, java.lang.String title, java.lang.String snippet, java.lang.String content)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Two pages are considered equal if they have the same url
 java.lang.String getContent()
           
 java.lang.String getSnippet()
           
 java.lang.String getTitle()
           
 java.lang.String getUrl()
           
 int hashCode()
          Must be overridden when overriding equals()
 void setContent(java.lang.String content)
           
 void setSnippet(java.lang.String snippet)
           
 void setTitle(java.lang.String title)
           
 void setUrl(java.lang.String url)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Page

public Page(java.lang.String url,
            java.lang.String title,
            java.lang.String snippet,
            java.lang.String content)
Parameters:
url - The URL of the page
title - The title of the page
snippet - A snippet of content from the page, if available
content - The HTML content of the page

Page

public Page(java.lang.String url,
            java.lang.String title,
            java.lang.String snippet)
Parameters:
url - The URL of the page
title - The title of the page
snippet - A snippet of content from the page, if available
Method Detail

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getUrl

public java.lang.String getUrl()

setUrl

public void setUrl(java.lang.String url)

getSnippet

public java.lang.String getSnippet()

setSnippet

public void setSnippet(java.lang.String snippet)

getContent

public java.lang.String getContent()

setContent

public void setContent(java.lang.String content)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
The string value of the Page

equals

public boolean equals(java.lang.Object obj)
Two pages are considered equal if they have the same url

Overrides:
equals in class java.lang.Object
Parameters:
obj - Object to compare to
Returns:
boolean True if the Pages are equal, false otherwise

hashCode

public int hashCode()
Must be overridden when overriding equals()

Overrides:
hashCode in class java.lang.Object
Returns:
int The hashed value of this Page