Class ForeachScope
java.lang.Object
java.util.AbstractMap<Object,Object>
org.apache.velocity.runtime.directive.Scope
org.apache.velocity.runtime.directive.ForeachScope
This represents scoping and metadata for #foreach,
adding index, count, hasNext, isFirst and isLast info.
- Version:
- $Id$
- Author:
- Nathan Bubna
-
Nested Class Summary
Nested classes/interfaces inherited from class Scope
Scope.InfoNested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Scope
entrySet, get, getDepth, getInfo, getParent, getReplaced, getTopmost, put, set, stopMethods inherited from class AbstractMap
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, toString, valuesMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
index
protected int index -
hasNext
protected boolean hasNext
-
-
Constructor Details
-
ForeachScope
-
-
Method Details
-
getIndex
public int getIndex() -
getCount
public int getCount() -
hasNext
public boolean hasNext() -
getHasNext
public boolean getHasNext() -
isFirst
public boolean isFirst() -
getFirst
public boolean getFirst() -
isLast
public boolean isLast() -
getLast
public boolean getLast()
-