public class WebPage extends java.lang.Object implements java.lang.Comparable<WebPage>
| Constructor and Description | 
|---|
| WebPage(java.lang.String url,
       java.lang.String pageContent)Create a web page with a count of one. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | compareTo(WebPage other)Compares this WebPage with the provided WebPage. | 
| java.lang.String | getContent()Accessor to page content. | 
| int | getFrequency()Accessor to frequency. | 
| java.lang.String | getUrl()Accessor to url. | 
| void | increment()Increment the frequency by one | 
| java.lang.String | toString()Return a string representation of this WebPage, 
 specifically:  frequency + "\t" + url + "\t" + pageContent  | 
public WebPage(java.lang.String url,
       java.lang.String pageContent)
url - the URL of this page.pageContent - the content of this pagepublic int compareTo(WebPage other)
compareTo in interface java.lang.Comparable<WebPage>other - WebPage to which this WebPage is to be compared.public java.lang.String toString()
frequency + "\t" + url + "\t" + pageContent toString in class java.lang.Objectpublic void increment()
public java.lang.String getContent()
public int getFrequency()
public java.lang.String getUrl()