freemarker.testcase.models
Class TransformHashWrapper

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

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

Part of the TestTransform testcase suite.

Version:
$Id: TransformHashWrapper.java,v 1.10 2003/11/08 06:14:42 run2000 Exp $
Author:
Nicholas Cull

Constructor Summary
TransformHashWrapper()
          Creates new TransformHashWrapper
 
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

TransformHashWrapper

public TransformHashWrapper()
Creates new TransformHashWrapper
Method Detail

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.

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

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.