|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--freemarker.template.expression.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(TemplateModelRoot modelRoot)
Retrieve the value of this NumberLiteral as a
TemplateModel . |
int |
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? |
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
NullPointerException
- the value is nulljava.lang.NumberFormatException
- the value could not be parsed as a long valueMethod Detail |
public TemplateModel getAsTemplateModel(TemplateModelRoot modelRoot)
NumberLiteral
as a
TemplateModel
.getAsTemplateModel
in interface Expression
modelRoot
- the template model that will be evaluated by the expressionFastScalar
containing the numberpublic boolean isComplete()
NumberLiteral
have a value?isComplete
in interface Expression
true
if there is a value, otherwise false
public int getType()
ExpressionUtils
class.getType
in interface Expression
public java.lang.String toString()
Object.toString
method.toString
in class java.lang.Object
String
representation of this expressionpublic boolean equals(java.lang.Object o)
Object.equals
method.equals
in class java.lang.Object
o
- the object we're comparing againsttrue
if the two objects are equal, otherwise
false
public int hashCode()
Object.hashCode
method.hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |