|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.misc.Subtract
@Deprecated public class Subtract
Allows two numeric template data models to be subtracted. Integer subtraction is performed.
Usage:
From java:
TemplateModelRoot root = new SimpleHash(); root.put( "subtract", new freemarker.ext.misc.Subtract() ); ...
From your FM-Classic template:
<assign var1 = 5>
<assign var2 = 3>
<assign var3 = subtract( var1, var2 )>
<p>The difference of ${var1} and ${var2} is: ${var3}</p>
...
| Constructor Summary | |
|---|---|
Subtract()
Deprecated. Creates new Subtract |
|
| Method Summary | |
|---|---|
TemplateModel |
exec(java.util.List<java.lang.String> arguments)
Deprecated. Executes a method call. |
boolean |
isEmpty()
Deprecated. Is the object empty? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Subtract()
| Method Detail |
|---|
public TemplateModel exec(java.util.List<java.lang.String> arguments)
throws TemplateModelException
exec in interface TemplateMethodModelarguments - a List of String objects
containing the values of the arguments passed to the method.
TemplateModel produced by the method, or null.
TemplateModelException
public boolean isEmpty()
throws TemplateModelException
isEmpty in interface TemplateModelfalse, to indicate the object is not empty
TemplateModelException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||