MCPcopy Create free account
hub / github.com/apache/freemarker / get

Method get

src/main/java/freemarker/template/SimpleSequence.java:226–240  ·  view source on GitHub ↗

@return the specified index in the list

(int i)

Source from the content-addressed store, hash-verified

224 * @return the specified index in the list
225 */
226 public TemplateModel get(int i) throws TemplateModelException {
227 try {
228 Object value = list.get(i);
229 if (value instanceof TemplateModel) {
230 return (TemplateModel) value;
231 }
232 TemplateModel tm = wrap(value);
233 list.set(i, tm);
234 return tm;
235 }
236 catch(IndexOutOfBoundsException e) {
237 return null;
238// throw new TemplateModelException(i + " out of bounds [0, " + list.size() + ")");
239 }
240 }
241
242 public int size() {
243 return list.size();

Callers

nothing calls this directly

Calls 3

setMethod · 0.80
getMethod · 0.65
wrapMethod · 0.65

Tested by

no test coverage detected