|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webrenderer.History
Represents a web browser history. Maintains a list of pages and associated dates at which they were accessed. The pages are sorted such that the newest pages appear at the start of the history collection.
Constructor Summary | |
History()
Creates an empty History Object |
Method Summary | |
void |
addPage(java.lang.String URL)
Adds a page with the given URL and the current date to the History. |
void |
addPage(java.lang.String URL,
boolean overwrite)
Adds a page with the given URL and the current date to the History. |
void |
clear()
Removes all items from the history. |
HistoryPage |
getPageAt(int i)
Returns the ith page in the History |
int |
length()
Gets the history size. |
void |
removePage(java.lang.String URL)
Removes the page with the given URL from the history list. |
java.lang.String |
toString()
Gets the history as a String. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public History()
Method Detail |
public void addPage(java.lang.String URL)
URL
- A String containing the URL of the page to be added.public void addPage(java.lang.String URL, boolean overwrite)
URL
- A String containing the URL of the page to be added.overwrite
- A boolean that determines whether the newer or older version of the url should
be kept if the url already exists in the list.public void removePage(java.lang.String URL)
URL
- A string containing the URL of the
page to be removed.public void clear()
public java.lang.String toString()
public int length()
public HistoryPage getPageAt(int i)
i
- the index of the page to return.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |