public class SiteURLManager.SiteURLComparator
extends java.lang.Object
implements java.util.Comparator
Constructor and Description |
---|
SiteURLManager.SiteURLComparator()
public constructor
|
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object p1,
java.lang.Object p2)
compare two URLs
|
protected int |
compareLevels(java.lang.String pURL1,
java.lang.String pURL2)
compare level counts for two URLs
|
boolean |
equals(java.lang.Object pComparator)
see if another comparator is equal to this
one
|
protected java.lang.String |
getDomainPortion(java.lang.String pURL)
get the domain name portion of a url
|
protected int |
getLevelCount(java.lang.String pURL)
get the number of levels in a URL
|
protected int |
getPriority(java.lang.String pURL)
get the priority of a given URL
|
public SiteURLManager.SiteURLComparator()
public int compare(java.lang.Object p1, java.lang.Object p2)
compare
in interface java.util.Comparator
protected int compareLevels(java.lang.String pURL1, java.lang.String pURL2)
pURL1
- the first URLpURL2
- the second URLprotected java.lang.String getDomainPortion(java.lang.String pURL)
pURL
- the urlprotected int getLevelCount(java.lang.String pURL)
pURL
- the url to count levels inprotected int getPriority(java.lang.String pURL)
pURL
- the url to get the int priority forpublic boolean equals(java.lang.Object pComparator)
equals
in interface java.util.Comparator
equals
in class java.lang.Object