@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'.
|
| Constructor and Description |
|---|
BooleanData(boolean value)
Deprecated.
|
| 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)
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() |
boolean |
toBoolean()
Deprecated.
|
String |
toString()
This was a required method in the old SoyData interface.
|
rendercoerceToBoolean, coerceToString, createFromExistingDatafloatValue, integerValue, longValue, numberValue, renderAndResolve, resolve, status, stringValuepublic static final BooleanData TRUE
public static final BooleanData FALSE
@Deprecated public BooleanData(boolean value)
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)
SoyValueequals in interface SoyValueequals in class SoyAbstractValueother - The other value to compare against.