public class Page extends Object implements Serializable, Comparable<Page>
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
String |
url
URL as a String for this Page
|
private int |
urlID
ID for this specific Page
|
Constructor and Description |
---|
Page(String url,
int urlID)
Construct a new page object.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Page candidate)
Since we implement the Comparable interface, we must provide
a method that describes how two Page objects should be compared.
|
boolean |
equals(Object obj)
Override for the equals() method so that
contains() will do proper comparison for ArrayList
|
String |
getURL()
Get the url String for this URL object
|
int |
getURLID()
Get the urlID of this URL
|
public static final long serialVersionUID
public String url
private int urlID
public Page(String url, int urlID)
url
- URL of the PageurlID
- assigned ID for this pagepublic int getURLID()
public String getURL()
public boolean equals(Object obj)
equals
in class Object
obj
- Page object to be comparedpublic int compareTo(Page candidate)
compareTo
in interface Comparable<Page>
candidate
- Page that 'this' Page is being compared to