velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r945915 - /velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/ForeachScope.java
Date Tue, 18 May 2010 21:55:39 GMT
Author: nbubna
Date: Tue May 18 21:55:38 2010
New Revision: 945915

URL: http://svn.apache.org/viewvc?rev=945915&view=rev
Log:
support $foreach.first and $foreach.last (VELOCITY-762)

Modified:
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/ForeachScope.java

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/ForeachScope.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/ForeachScope.java?rev=945915&r1=945914&r2=945915&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/ForeachScope.java
(original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/ForeachScope.java
Tue May 18 21:55:38 2010
@@ -61,9 +61,19 @@ public class ForeachScope extends Scope
         return index < 1;
     }
 
+    public boolean getFirst()
+    {
+        return isFirst();
+    }
+
     public boolean isLast()
     {
         return !hasNext;
     }
 
+    public boolean getLast()
+    {
+        return isLast();
+    }
+
 }



Mime
View raw message