@Immutable public final class BooleanData extends PrimitiveData
Important: This class may only be used in implementing plugins (e.g. functions, directives).
| Modifier and Type | Field and Description |
|---|---|
static BooleanData |
FALSE
Static instance of BooleanData with value 'false'.
|
static BooleanData |
TRUE
Static instance of BooleanData with value 'true'.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue()
Precondition: Only call this method if you know that this SoyValue object is a boolean.
|
boolean |
coerceToBoolean()
Coerces this value into a boolean.
|
String |
coerceToString()
Coerces this value into a string.
|
boolean |
equals(Object other)
Compares this value against another for equality in the sense of the '==' operator of Soy.
|
static BooleanData |
forValue(boolean value)
Gets a BooleanData instance for the given value.
|
boolean |
getValue()
Returns the boolean value.
|
int |
hashCode() |
String |
toString() |
rendercreateFromExistingDatafloatValue, integerValue, longValue, numberValue, render, renderAndResolve, resolve, status, stringValuepublic static final BooleanData TRUE
public static final BooleanData FALSE
public static BooleanData forValue(boolean value)
value - The desired value.public boolean getValue()
public boolean booleanValue()
SoyValuebooleanValue in interface SoyValuebooleanValue in class SoyAbstractValuepublic boolean coerceToBoolean()
SoyValuepublic String coerceToString()
SoyValuepublic boolean equals(Object other)
SoyValueequals in interface SoyValueequals in class SoyAbstractValueother - The other value to compare against.