Class ForeachScope

  • All Implemented Interfaces:
    java.util.Map

    public class ForeachScope
    extends Scope
    This represents scoping and metadata for #foreach, adding index, count, hasNext, isFirst and isLast info.
    Version:
    $Id$
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.velocity.runtime.directive.Scope

        Scope.Info
      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean hasNext  
      protected int index  
      • Fields inherited from class org.apache.velocity.runtime.directive.Scope

        owner
    • Constructor Summary

      Constructors 
      Constructor Description
      ForeachScope​(java.lang.Object owner, java.lang.Object replaces)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCount()  
      boolean getFirst()  
      boolean getHasNext()  
      int getIndex()  
      boolean getLast()  
      boolean hasNext()  
      boolean isFirst()  
      boolean isLast()  
      • Methods inherited from class java.util.AbstractMap

        clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Field Detail

      • index

        protected int index
      • hasNext

        protected boolean hasNext
    • Constructor Detail

      • ForeachScope

        public ForeachScope​(java.lang.Object owner,
                            java.lang.Object replaces)
    • Method Detail

      • 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()