class SafeStylesString extends java.lang.Object implements SafeStyles
SafeStyles
.
This class is package-private and intended for internal use by the
com.google.gwt.safecss
package.
All implementors must implement .equals and .hashCode so that they operate just like String.equals() and String.hashCode().
Constructor and Description |
---|
SafeStylesString(java.lang.String css)
Constructs a
SafeStylesString from a string. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asString()
Returns this object's contained CSS 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.
|
SafeStylesString(java.lang.String css)
SafeStylesString
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
SafeStyles
interface.css
- the string to be wrapped as a SafeStyles
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 an CSS attribute context.
asString
in interface SafeStyles
public boolean equals(java.lang.Object obj)
equals
in interface SafeStyles
equals
in class java.lang.Object
obj
- the object to compare topublic int hashCode()
hashCode
in interface SafeStyles
hashCode
in class java.lang.Object