|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfreemarker.core.StringArraySequence
public class StringArraySequence
Sequence variable implementation that wraps a String[] with relatively low resource utilization. Warning: it does not copy the wrapped array, so do not modify that after the model was made!
| Field Summary |
|---|
| Fields inherited from interface freemarker.template.TemplateModel |
|---|
NOTHING |
| Constructor Summary | |
|---|---|
StringArraySequence(java.lang.String[] stringArray)
Warning: Does not copy the argument array! |
|
| Method Summary | |
|---|---|
TemplateModel |
get(int index)
Retrieves the i-th template model in this sequence. |
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringArraySequence(java.lang.String[] stringArray)
| Method Detail |
|---|
public TemplateModel get(int index)
TemplateSequenceModel
get in interface TemplateSequenceModelnull if
the index is out of bounds. Note that a null value is
interpreted by FreeMarker as "variable does not exist", and accessing
a missing variables is usually considered as an error in the FreeMarker
Template Language, so the usage of a bad index will not remain hidden.public int size()
size in interface TemplateSequenceModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||