@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.
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.
|
render
coerceToBoolean, coerceToString, createFromExistingData, equals
equals, floatValue, integerValue, longValue, numberValue, resolve, stringValue
public 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()
SoyValue
booleanValue
in interface SoyValue
booleanValue
in class SoyAbstractValue
public String toString()
SoyData
@Deprecated public boolean toBoolean()
SoyData
public boolean equals(Object other)
SoyData