|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--freemarker.testcase.models.StringNumberModel
A simple model that implements both a String and a numeric value. This is used for testing conversions and method models.
Constructor Summary | |
StringNumberModel(java.lang.String stringValue,
long longValue)
Constructor for initializing both a String and a number value. |
Method Summary | |
long |
getAsNumber()
Retrieve the numeric value from the model. |
java.lang.String |
getAsString()
Retrieve the scalar value from the model. |
boolean |
isEmpty()
Is the model empty? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringNumberModel(java.lang.String stringValue, long longValue)
stringValue
- longValue
- Method Detail |
public boolean isEmpty()
isEmpty
in interface TemplateModel
false
to indicate the model is not emptypublic java.lang.String getAsString()
getAsString
in interface TemplateScalarModel
String
valuepublic long getAsNumber()
getAsNumber
in interface TemplateNumberModel
long
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |