class SafeUriString extends java.lang.Object implements SafeUri
SafeUri
.
This class is package-private and intended for internal use by the
com.google.gwt.safehtml
package.
All implementors must implement .equals and .hashCode so that they operate
just like String.equals() and String.hashCode().
Constructor and Description |
---|
SafeUriString(java.lang.String uri)
Constructs a
SafeUriString from a string. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asString()
Returns this object's contained URI as a string.
|
boolean |
equals(java.lang.Object obj)
Compares this string to the specified object.
|
int |
hashCode()
Returns a hash code for this string.
|
java.lang.String |
toString() |
SafeUriString(java.lang.String uri)
SafeUriString
from a string. Callers are responsible
for ensuring that the string passed as the argument to this constructor
satisfies the constraints of the contract imposed by the SafeUri
interface.uri
- the string to be wrapped as a SafeUri
public java.lang.String asString()
Based on this class' contract, the returned value will be non-null and a string that is safe to use in a URL context.
public boolean equals(java.lang.Object obj)
public int hashCode()
public java.lang.String toString()
toString
in class java.lang.Object