ForeachScope (Velocity 1.7 API)
Keywords: org.apache.velocity.runtime.directive.ForeachScope class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.runtime.directive
Class ForeachScope

    java.lang.Object
      java.util.AbstractMap
          org.apache.velocity.runtime.directive.Scope
              org.apache.velocity.runtime.directive.ForeachScope

All Implemented Interfaces:
  Map

public class ForeachScope
extends Scope

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 inherited from class org.apache.velocity.runtime.directive.Scope
`Scope.Info`

Nested classes inherited from class java.util.Map
`Map.Entry`

Field Summary
`protected boolean` | `hasNext`
`protected int` | `index`

Fields inherited from class org.apache.velocity.runtime.directive.Scope
`owner`

Constructor Summary
`ForeachScope(Object owner, Object replaces)`

Method Summary
`int` | `getCount()`
`boolean` | `getFirst()`
`boolean` | `getHasNext()`
`int` | `getIndex()`
`boolean` | `getLast()`
`boolean` | `hasNext()`
`boolean` | `isFirst()`
`boolean` | `isLast()`

Methods inherited from class org.apache.velocity.runtime.directive.Scope
`entrySet, get, getDepth, getInfo, getParent, getReplaced, getTopmost, put, stop`

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`

Field Detail

### index

    protected int index

### hasNext

    protected boolean hasNext

Constructor Detail

### ForeachScope

    public ForeachScope(Object owner,
                        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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.