freemarker.testcase.models
Class BooleanHash2

java.lang.Object
  extended by freemarker.testcase.models.BooleanHash2
All Implemented Interfaces:
TemplateHashModel, TemplateModel

public final class BooleanHash2
extends java.lang.Object
implements TemplateHashModel

Tests the impact that the isEmpty() method has on template hash models.

Version:
$Id: BooleanHash2.java 1003 2004-10-16 14:54:58Z run2000 $
Author:
Nicholas Cull

Constructor Summary
BooleanHash2()
          Creates new BooleanHash2.
 
Method Summary
 TemplateModel get(java.lang.String key)
          Gets a TemplateModel from the hash.
 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

BooleanHash2

public BooleanHash2()
Creates new BooleanHash2.

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.
Throws:
TemplateModelException - there was a problem getting the value for the given key

isEmpty

public boolean isEmpty()
                throws TemplateModelException
Is the model empty?

Specified by:
isEmpty in interface TemplateModel
Returns:
true if this object is empty, otherwise false
Throws:
TemplateModelException