freemarker.testcase.models

Class MultiModel3

Implemented Interfaces:
TemplateHashModel, TemplateModel, TemplateScalarModel

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

Testcase to see how FreeMarker deals with multiple Template models.
Version:
$Id: MultiModel3.java,v 1.14 2004/01/06 17:06:44 szegedia Exp $

Fields inherited from interface freemarker.template.TemplateModel

NOTHING

Fields inherited from interface freemarker.template.TemplateScalarModel

EMPTY_STRING

Method Summary

TemplateModel
get(String key)
Gets a TemplateModel from the hash.
String
getAsString()
Returns the scalar's value as a String.
boolean
isEmpty()

Method Details

get

public TemplateModel get(String key)
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.

getAsString

public String getAsString()
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()
Specified by:
isEmpty in interface TemplateHashModel
Returns:
true if this object is empty.