@ParametersAreNonnullByDefault @Immutable public abstract class SanitizedContent extends SoyData implements SoyString
| Modifier and Type | Class and Description |
|---|---|
static class |
SanitizedContent.ContentKind
A kind of textual content.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Compares this value against another for equality in the sense of the '==' operator of Soy.
|
abstract String |
getContent()
Returns a string of valid content with kind
getContentKind(). |
Dir |
getContentDirection()
Returns the content's direction; null indicates that the direction is unknown, and is to be
estimated when necessary.
|
SanitizedContent.ContentKind |
getContentKind()
Returns the kind of content.
|
int |
hashCode() |
String |
stringValue()
Returns the string value.
|
boolean |
toBoolean()
Deprecated.
|
com.google.common.html.types.SafeHtml |
toSafeHtml()
Converts a Soy
SanitizedContent of kind HTML into a SafeHtml. |
com.google.common.html.types.SafeHtmlProto |
toSafeHtmlProto()
Converts a Soy
SanitizedContent of kind HTML into a SafeHtmlProto. |
com.google.common.html.types.SafeStyleSheet |
toSafeStyleSheet()
Converts a Soy
SanitizedContent of kind CSS into a SafeStyleSheet. |
com.google.common.html.types.SafeStyleSheetProto |
toSafeStyleSheetProto()
Converts a Soy
SanitizedContent of kind CSS into a SafeStyleSheetProto. |
String |
toString()
This was a required method in the old SoyData interface.
|
coerceToBoolean, coerceToString, createFromExistingDatabooleanValue, floatValue, integerValue, longValue, numberValue, renderAndResolve, resolve, statusclone, finalize, getClass, notify, notifyAll, wait, wait, waitbooleanValue, coerceToBoolean, coerceToString, floatValue, integerValue, longValue, numberValue, renderrenderAndResolve, resolve, statuspublic abstract String getContent()
getContentKind().public SanitizedContent.ContentKind getContentKind()
@Nullable public Dir getContentDirection()
@Deprecated public boolean toBoolean()
SoyDatapublic String toString()
SoyDatapublic String stringValue()
In contexts where a string value is required, SanitizedContent is permitted.
stringValue in interface SoyValuestringValue in class SoyAbstractValuepublic boolean equals(@Nullable Object other)
SoyValueequals in interface SoyValueequals in class SoyAbstractValueother - The other value to compare against.public com.google.common.html.types.SafeHtml toSafeHtml()
SanitizedContent of kind HTML into a SafeHtml.IllegalStateException - if this SanitizedContent's content kind is not
SanitizedContent.ContentKind.HTML.public com.google.common.html.types.SafeHtmlProto toSafeHtmlProto()
SanitizedContent of kind HTML into a SafeHtmlProto.IllegalStateException - if this SanitizedContent's content kind is not
SanitizedContent.ContentKind.HTML.public com.google.common.html.types.SafeStyleSheet toSafeStyleSheet()
SanitizedContent of kind CSS into a SafeStyleSheet.
To ensure correct behavior and usage, the SanitizedContent object should fulfill the contract of SafeStyleSheet - the CSS content should represent the top-level content of a style element within HTML.
IllegalStateException - if this SanitizedContent's content kind is not
SanitizedContent.ContentKind.CSS.public com.google.common.html.types.SafeStyleSheetProto toSafeStyleSheetProto()
SanitizedContent of kind CSS into a SafeStyleSheetProto.
To ensure correct behavior and usage, the SanitizedContent object should fulfill the contract of SafeStyleSheet - the CSS content should represent the top-level content of a style element within HTML.
IllegalStateException - if this SanitizedContent's content kind is not
SanitizedContent.ContentKind.CSS.