|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfreemarker.testcase.models.MultiModel1
public final class MultiModel1
Testcase to see how FM-Classic deals with multiple Template models.
MultiModel2
,
MultiModel3
,
MultiModel4
,
MultiModel5
Constructor Summary | |
---|---|
MultiModel1()
Creates new MultiModel1. |
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 . |
TemplateModel |
getAtIndex(long index)
Retrieves the specified item from the list. |
boolean |
isEmpty()
Is the model empty? |
void |
releaseIterator(TemplateIteratorModel iterator)
Returns the used iterator to the list model. |
TemplateIteratorModel |
templateIterator()
Retrieves an iterator to iterate over this list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiModel1() throws TemplateModelException
TemplateModelException
Method Detail |
---|
public TemplateModel get(java.lang.String key) throws TemplateModelException
TemplateModel
from the hash.
get
in interface TemplateHashModel
key
- the name by which the TemplateModel
is identified in the template.
TemplateModel
referred to by the key,
or null
if not found.
TemplateModelException
- there was a problem getting the value
for the given keypublic boolean isEmpty() throws TemplateModelException
isEmpty
in interface TemplateModel
false
to indicate the model is not empty
TemplateModelException
public TemplateIteratorModel templateIterator() throws TemplateModelException
templateIterator
in interface TemplateListModel2
TemplateModelException
- the next item in the list can't be
retrieved, or no next item exists.public void releaseIterator(TemplateIteratorModel iterator)
releaseIterator
in interface TemplateListModel2
iterator
- the iterator to be returned to the object poolpublic TemplateModel getAtIndex(long index) throws TemplateModelException
getAtIndex
in interface TemplateIndexedModel
index
- the index of the item to be retrieved.
TemplateModelException
- the specified item in the list can't be
retrieved, or the index is out of bounds.public java.lang.String getAsString() throws TemplateModelException
String
.
getAsString
in interface TemplateScalarModel
String
value of this scalar.
TemplateModelException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |