freemarker.testcase.models

Class TransformHashWrapper

Implemented Interfaces:
TemplateHashModel, TemplateModel, TemplateScalarModel

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

Part of the TestTransform testcase suite.
Version:
$Id: TransformHashWrapper.java,v 1.15 2005/06/16 18:13:59 ddekany Exp $

Fields inherited from interface freemarker.template.TemplateModel

NOTHING

Fields inherited from interface freemarker.template.TemplateScalarModel

EMPTY_STRING

Constructor Summary

TransformHashWrapper()
Creates new TransformHashWrapper

Method Summary

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

Constructor Details

TransformHashWrapper

public TransformHashWrapper()
Creates new TransformHashWrapper

Method Details

get

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

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.