public class Link
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
Link()
May be subclassed.
|
|
Link(java.lang.String urlName)
Construct a link with specified URL string
|
|
Link(java.net.URL url)
Constructs a link with specified URL.
|
Modifier and Type | Method and Description |
---|---|
static java.net.URL |
cleanURL(java.net.URL url)
Standardize URL by removing trailing slashes, URL decoding it,
replacing the UTCS-specific "/users/user" to "/~user" link, and
removing a set of common index pages.
|
boolean |
equals(java.lang.Object o) |
java.net.URL |
getURL()
Returns the URL of this link.
|
int |
hashCode() |
static void |
main(java.lang.String[] args) |
static java.net.URL |
removeEndSlash(java.net.URL url)
Removes slash at end of URL to normalize
|
static java.net.URL |
removeRef(java.net.URL url)
Remove the internal "ref" pointer in a URL if there is
one.
|
java.lang.String |
toString() |
protected Link()
Link
.public Link(java.net.URL url)
url
- The URL for this link.public Link(java.lang.String urlName)
public final java.net.URL getURL()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static java.net.URL cleanURL(java.net.URL url)
url
- The unnormalized URLpublic static java.net.URL removeEndSlash(java.net.URL url)
public static java.net.URL removeRef(java.net.URL url)
public static void main(java.lang.String[] args)