|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.template.expression.NumberLiteral
public final class NumberLiteral
Represents a number literal in a FM-Classic template.
| Constructor Summary | |
|---|---|
NumberLiteral(java.lang.String value)
Constructor that takes a numeric value as a String. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Override the Object.equals method. |
TemplateModel |
getAsTemplateModel(TemplateWriteableHashModel modelRoot)
Retrieve the value of this NumberLiteral as a
TemplateModel. |
java.util.Set<ExpressionUtils.ExpressionType> |
getType()
Determine the type of result that can be calculated by this expression. |
int |
hashCode()
Override the Object.hashCode method. |
boolean |
isComplete()
Does the NumberLiteral 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()
Override the Object.toString method. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NumberLiteral(java.lang.String value)
String.
value - the value to be held by this NumberLiteral
java.lang.NullPointerException - the value is null
java.lang.NumberFormatException - the value could not be parsed as a long value| Method Detail |
|---|
public TemplateModel getAsTemplateModel(TemplateWriteableHashModel modelRoot)
NumberLiteral as a
TemplateModel.
getAsTemplateModel in interface ExpressionmodelRoot - the template model that will be evaluated by the expression
FastScalar containing the numberpublic boolean isComplete()
NumberLiteral 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 java.lang.String toString()
Object.toString method.
toString in class java.lang.ObjectString representation of this expressionpublic boolean equals(java.lang.Object o)
Object.equals method.
equals in class java.lang.Objecto - the object we're comparing against
true if the two objects are equal, otherwise
falsepublic int hashCode()
Object.hashCode method.
hashCode in class java.lang.Objectpublic 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 | ||||||||