|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfreemarker.ext.beans2.NumberWrapper
public class NumberWrapper
Constructor Summary | |
---|---|
NumberWrapper()
|
|
NumberWrapper(java.lang.Number object)
|
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
long |
getAsNumber()
Returns the number's value as a long . |
java.lang.Object |
getAsObject()
Return the underlying object to the reflection mechanism in the freemarker.ext.beans package. |
java.lang.String |
getAsString()
Returns the scalar's value as a String . |
boolean |
isEmpty()
Is the object empty? |
void |
setObject(java.lang.Object object)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NumberWrapper()
public NumberWrapper(java.lang.Number object)
Method Detail |
---|
public void setObject(java.lang.Object object)
setObject
in interface ObjectWrapper
public boolean isEmpty() throws TemplateModelException
TemplateModel
isEmpty
in interface TemplateModel
true
if this object is empty, otherwise false
TemplateModelException
public java.lang.String getAsString() throws TemplateModelException
TemplateScalarModel
String
.
getAsString
in interface TemplateScalarModel
String
value of this scalar.
TemplateModelException
public long getAsNumber() throws TemplateModelException
TemplateNumberModel
long
.
getAsNumber
in interface TemplateNumberModel
long
value of this scalar.
TemplateModelException
public java.lang.Object getAsObject() throws TemplateModelException
TemplateObjectModel
freemarker.ext.beans
package. Any variables, methods
or properties can be called directly via reflection.
getAsObject
in interface TemplateObjectModel
TemplateModelException
- the object could not be returnedpublic java.lang.Object clone()
clone
in interface ObjectWrapper
clone
in class java.lang.Object
java.lang.RuntimeException
- the clone operation was not successful
java.lang.OutOfMemoryError
- if there is not enough memory.Cloneable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |