[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/lava/gzz/potion/potions Hop.java Step.java ...
From: |
Benja Fallenstein |
Subject: |
[Gzz-commits] gzz/lava/gzz/potion/potions Hop.java Step.java ... |
Date: |
Mon, 30 Dec 2002 12:47:33 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Benja Fallenstein <address@hidden> 02/12/30 12:47:33
Modified files:
lava/gzz/potion/potions: Hop.java Step.java
Added files:
lava/gzz/potion/potions: Delete.java GreaterThan.java
Headcell.java
Log message:
integrate some older potion code
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/gzz/potion/potions/Delete.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/gzz/potion/potions/GreaterThan.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/gzz/potion/potions/Headcell.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/gzz/potion/potions/Hop.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/gzz/potion/potions/Step.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gzz/lava/gzz/potion/potions/Hop.java
diff -u gzz/lava/gzz/potion/potions/Hop.java:1.3
gzz/lava/gzz/potion/potions/Hop.java:1.4
--- gzz/lava/gzz/potion/potions/Hop.java:1.3 Mon Dec 30 08:49:48 2002
+++ gzz/lava/gzz/potion/potions/Hop.java Mon Dec 30 12:47:33 2002
@@ -38,7 +38,9 @@
}
}
public String getString(Expression[] params, Map context){
- return null;
+ String s = params[0].getString(context);
+ String t = params[1].getString(context);
+ return "Hop "+s+" "+t;
}
public void render (Expression[] params, Map context, HChain into){}
public Type[] getParams(){
Index: gzz/lava/gzz/potion/potions/Step.java
diff -u gzz/lava/gzz/potion/potions/Step.java:1.2
gzz/lava/gzz/potion/potions/Step.java:1.3
--- gzz/lava/gzz/potion/potions/Step.java:1.2 Sun Dec 22 20:52:38 2002
+++ gzz/lava/gzz/potion/potions/Step.java Mon Dec 30 12:47:33 2002
@@ -1,28 +1,47 @@
+//(c):Anne Siepelmeyer
package gzz.potion.potions;
import java.util.*;
+import gzz.zzutil.*;
import gzz.vob.linebreaking.HChain;
import gzz.*;
import gzz.potion.*;
-public class Step implements Command {
-
- public void execute(List[] params, Map context) {
-
- List steps = params[0];
-
- for(Iterator i = steps.iterator(); i.hasNext();) {
- Cell c = (Cell)i.next();
- }
- }
+public class Step implements Function {
+
+ public List evaluate(List[] params, Map context) {
+
+ List result = new ArrayList();
+
+ for(Iterator i = params[0].iterator(); i.hasNext();) {
+ Integer n = (Integer)i.next();
+
+ for(Iterator j= params[1].iterator(); j.hasNext();) {
+ Direction dir = (Direction)j.next();
- public String getString(Expression[] params, Map context) {
- return null;
- }
-
- public void render(Expression[] params, Map context, HChain into) {
- }
+ for(Iterator k = params[2].iterator();
k.hasNext();) {
+ Cell c = (Cell)k.next();
+
+ if(dir.dir >= 0)
+ result.add(c.s(dir.dim,
n.intValue()));
+ else
+ result.add(c.s(dir.dim,
-n.intValue()));
+ }
+ }
+ }
+ return result;
+ }
- public Type[] getParams() {
- return null;
- }
+ public String getString(Expression[] params, Map context) {
+ String s = params[0].getString(context);
+ String t = params[1].getString(context);
+ String u = params[2].getString(context);
+ return "the cell "+s+" steps "+t+" of "+u ;
+ }
+
+ public void render(Expression[] params,Map context, HChain into) {
+ }
+
+ public Type[] getParams() {
+ return null;
+ }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/lava/gzz/potion/potions Hop.java Step.java ...,
Benja Fallenstein <=