freemarker.ext.misc
Class GreaterThan

java.lang.Object
  extended by freemarker.ext.misc.GreaterThan
All Implemented Interfaces:
TemplateMethodModel, TemplateModel

Deprecated. With the introduction of native numbers and numeric operators in 1.8, this implementation is now deprecated

@Deprecated
public class GreaterThan
extends java.lang.Object
implements TemplateMethodModel

Compares two scalar data models as numbers. Integer comparison is performed.

Usage:
From java:

 TemplateModelRoot root = new SimpleHash();

 root.put( "greaterThan", new freemarker.ext.misc.GreaterThan() );

 ...
 

From your FM-Classic template:

 <assign temp = 1>
 <if greaterThan( temp, 5 )>
   <p>One is greater than five!</p>
 </if>

 ...
 

Since:
1.7
Version:
$Id: GreaterThan.java,v 1.2 2004/10/18 04:20:28 run2000 Exp $

Constructor Summary
GreaterThan()
          Deprecated. Creates new GreaterThan
 
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

GreaterThan

public GreaterThan()
Deprecated. 
Creates new GreaterThan

Method Detail

exec

public TemplateModel exec(java.util.List<java.lang.String> arguments)
                   throws TemplateModelException
Deprecated. 
Executes a method call.

Specified by:
exec in interface TemplateMethodModel
Parameters:
arguments - a List of String objects containing the values of the arguments passed to the method.
Returns:
the TemplateModel produced by the method, or null.
Throws:
TemplateModelException

isEmpty

public boolean isEmpty()
                throws TemplateModelException
Deprecated. 
Is the object empty?

Specified by:
isEmpty in interface TemplateModel
Returns:
false, to indicate this object is not empty
Throws:
TemplateModelException