|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.template.expression.BooleanLiteral
public final class BooleanLiteral
Represents a boolean literal in a FM-Classic template.
| Field Summary | |
|---|---|
static BooleanLiteral |
FALSE
The false instance of this class. |
static BooleanLiteral |
TRUE
The true instance of this class. |
| Method Summary | |
|---|---|
TemplateModel |
getAsTemplateModel(TemplateWriteableHashModel modelRoot)
Retrieve the value of this BooleanLiteral as a
TemplateModel. |
static BooleanLiteral |
getInstance(boolean isTrue)
Factory method for retrieving instances of a BooleanLiteral. |
java.util.Set<ExpressionUtils.ExpressionType> |
getType()
Determine the type of result that can be calculated by this expression. |
boolean |
isComplete()
Does the BooleanLiteral have a value? |
boolean |
isConstant()
Determine whether result calculated by this expression is a constant value. |
Expression |
resolveExpression()
Resolves the current expression, possibly into a different expression object. |
java.lang.String |
toString()
Retrieve the value of this object as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final BooleanLiteral TRUE
true instance of this class.
public static final BooleanLiteral FALSE
false instance of this class.
| Method Detail |
|---|
public TemplateModel getAsTemplateModel(TemplateWriteableHashModel modelRoot)
throws TemplateException
BooleanLiteral as a
TemplateModel.
getAsTemplateModel in interface ExpressionmodelRoot - the template model that will be evaluated by the expression
TemplateException - the expression could not be evaluated for some reasonpublic boolean isComplete()
BooleanLiteral have a value?
isComplete in interface Expressiontrue if there is a value, otherwise falsepublic java.util.Set<ExpressionUtils.ExpressionType> getType()
ExpressionUtils class.
getType in interface Expressionpublic boolean isConstant()
isConstant in interface Expressionpublic static BooleanLiteral getInstance(boolean isTrue)
BooleanLiteral.
isTrue - true if we want a True instance,
otherwise false to retrieve a False instance
isTrue is set, otherwise a False instancepublic java.lang.String toString()
toString in class java.lang.ObjectString representation of this expressionpublic Expression resolveExpression()
readResolve method. Situations where this may be used are:
resolveExpression in interface Expression
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||