@Immutable public final class BooleanData extends PrimitiveData
Important: This class may only be used in implementing plugins (e.g. functions, directives).
SoyValueProvider.ResolveStatus| 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'.
|
| Constructor and Description |
|---|
BooleanData(boolean value)
Deprecated.
Use
TRUE, FALSE, or
forValue(boolean). |
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue()
Precondition: Only call this method if you know that this SoyValue object is a boolean.
|
boolean |
equals(Object other)
This was a required method in the old SoyData interface.
|
static BooleanData |
forValue(boolean value)
Gets a BooleanData instance for the given value.
|
boolean |
getValue()
Returns the boolean value.
|
int |
hashCode() |
boolean |
toBoolean()
Deprecated.
|
String |
toString()
This was a required method in the old SoyData interface.
|
rendercoerceToBoolean, coerceToString, createFromExistingData, equalsequals, floatValue, integerValue, longValue, numberValue, render, resolve, status, stringValuepublic static final BooleanData TRUE
public static final BooleanData FALSE
@Deprecated public BooleanData(boolean value)
TRUE, FALSE, or
forValue(boolean).value - The boolean value.public static BooleanData forValue(boolean value)
value - The desired value.public boolean getValue()
public boolean booleanValue()
SoyValuebooleanValue in interface SoyValuebooleanValue in class SoyAbstractValuepublic String toString()
SoyData@Deprecated public boolean toBoolean()
SoyDatapublic boolean equals(Object other)
SoyData