freemarker.ext.misc
Class IsScalar

java.lang.Object
  |
  +--freemarker.ext.misc.IsScalar
All Implemented Interfaces:
TemplateMethodModel2, TemplateModel

public final class IsScalar
extends java.lang.Object
implements TemplateMethodModel2

Determines whether a given model is an instance of a TemplateScalarModel.

Note:
IsScalar is a singleton instance. Use the getInstance() method to retrieve instances of this model.

Since:
1.8
Version:
$Id: IsScalar.java,v 1.2 2003/11/17 13:06:24 run2000 Exp $
Author:
Nicholas Cull

Method Summary
 TemplateModel exec(java.util.List arguments)
          Executes a method call.
static IsScalar getInstance()
          Return a singleton instance of this class.
 boolean isEmpty()
          Is the object empty?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static IsScalar getInstance()
Return a singleton instance of this class.
Returns:
a new IsScalar object

isEmpty

public boolean isEmpty()
                throws TemplateModelException
Is the object empty?
Specified by:
isEmpty in interface TemplateModel
Returns:
true if this object is empty, otherwise false

exec

public TemplateModel exec(java.util.List arguments)
                   throws TemplateModelException
Executes a method call. Arguments are passed as a List of TemplateModel objects.
Specified by:
exec in interface TemplateMethodModel2
Parameters:
arguments - a List of TemplateModel objects containing the values of the arguments passed to the method.
Returns:
the TemplateModel produced by the method, or null.