freemarker.testcase.models
Class MultiModel3

java.lang.Object
  |
  +--freemarker.testcase.models.MultiModel3
All Implemented Interfaces:
TemplateHashModel, TemplateModel, TemplateScalarModel

public final class MultiModel3
extends java.lang.Object
implements TemplateScalarModel, TemplateHashModel

Testcase to see how FM-Classic deals with multiple Template models.

Version:
$Id: MultiModel3.java,v 1.9 2003/11/28 01:17:07 run2000 Exp $
See Also:
MultiModel1, MultiModel2, MultiModel4, MultiModel5

Constructor Summary
MultiModel3()
          Creates new MultiModel3.
 
Method Summary
 TemplateModel get(java.lang.String key)
          Gets a TemplateModel from the hash.
 java.lang.String getAsString()
          Returns the scalar's value as a String.
 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

MultiModel3

public MultiModel3()
Creates new MultiModel3.
Method Detail

getAsString

public java.lang.String getAsString()
                             throws TemplateModelException
Returns the scalar's value as a String.
Specified by:
getAsString in interface TemplateScalarModel
Returns:
the String value of this scalar.

isEmpty

public boolean isEmpty()
                throws TemplateModelException
Is the model empty?
Specified by:
isEmpty in interface TemplateModel
Returns:
false to indicate the model is not empty

get

public TemplateModel get(java.lang.String key)
                  throws TemplateModelException
Gets a TemplateModel from the hash.
Specified by:
get in interface TemplateHashModel
Parameters:
key - the name by which the TemplateModel is identified in the template.
Returns:
the TemplateModel referred to by the key, or null if not found.