|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.artima.place.URLString
Holds a valid URL String.
This is not clonable because its immutable.
| Constructor Summary | |
URLString(java.lang.String url)
Constructs a URLString with passed String
URL. |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
Compares the specified Object with this
URLString for equality. |
java.lang.String |
getFile()
Returns the file portion of the URL. |
java.lang.String |
getHost()
Returns the host portion of the URL. |
int |
getPort()
Returns the port portion of the URL. |
java.lang.String |
getProtocol()
Returns the protocol portion of the URL. |
java.lang.String |
getRef()
Returns the reference portion of the URL. |
int |
hashCode()
Returns the hash code value for this URLString. |
java.lang.String |
toString()
Returns the String URL that's stored in this
URLString. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public URLString(java.lang.String url)
throws java.net.MalformedURLException
URLString with passed String
URL.url - The String URL to hold in this
URLStringNullPointerException - if the URL String
reference passed to this constructor is nulljava.net.MalformedURLException - if the String passed to
this constructor is does not have the form of a valid URL.| Method Detail |
public java.lang.String toString()
String URL that's stored in this
URLString.toString in class java.lang.ObjectString URL held in this
URLStringpublic java.lang.String getProtocol()
String protocol portion of the URLpublic java.lang.String getHost()
String host portion of the URLpublic int getPort()
int, or -1, if no port is specified in this URL.public java.lang.String getFile()
String file portion of the URLpublic java.lang.String getRef()
String reference portion of the URLpublic boolean equals(java.lang.Object o)
Object with this
URLString for equality. Two URLStrings are
semantically equal if their String URLs have the same
value.equals in class java.lang.Objecto - the object to compare to this one.true if this object is semantically equal to the
passed object.public int hashCode()
URLString. The
hashcode for a URLString is the hashcode for the
URLString's constituent String URL.hashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||