Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.safehtml.shared
Class SafeUriString

    java.lang.Object
      com.google.gwt.safehtml.shared.SafeUriString

All Implemented Interfaces:
  SafeUri

     class SafeUriString

extends java.lang.Object
implements SafeUri

A string wrapped as an object of type `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 Summary
`SafeUriString(java.lang.String uri)` Constructs a `SafeUriString` from a string.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SafeUriString

    SafeUriString(java.lang.String uri)

  Constructs a `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.

  Parameters:
    `uri` - the string to be wrapped as a `SafeUri`

Method Detail

### asString

    public java.lang.String asString()

  Returns this object's contained URI as a string.

  Based on this class' contract, the returned value will be non-null and a string that is safe to use in a URL context.

  Specified by:
    `asString` in interface `SafeUri`
  Returns:
    the contents as a String

### equals

    public boolean equals(java.lang.Object obj)

  Compares this string to the specified object.

  Specified by:
    `equals` in interface `SafeUri`
  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - the object to compare to

### hashCode

    public int hashCode()

  Returns a hash code for this string.

  Specified by:
    `hashCode` in interface `SafeUri`
  Overrides:
    `hashCode` in class `java.lang.Object`

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD