Commit 74cb98c4 authored by Fabien Triolet's avatar Fabien Triolet
Browse files

Added a method to get the type of the iterator

parent 0d02f0c3
/**
* $Id: directoryIterator.java,v 1.2 2002-10-28 09:26:04 triolet Exp $
* $Id: directoryIterator.java,v 1.3 2002-11-04 15:23:39 triolet Exp $
*
* Transmorpher
*
......@@ -48,6 +48,7 @@ public final class directoryIterator implements TIterator {
private int curr = 0;
private int left;
private String name;
private String type="file";
/** The constructor */
public directoryIterator(String n, Parameters p) {
......@@ -101,7 +102,10 @@ public final class directoryIterator implements TIterator {
left--;
return (Object)list[curr-1].getPath();
}
public String getType(){
return type;
}
} //end class
......
......@@ -65,7 +65,7 @@ public final class fileIterator implements TIterator {
/** an array of file names */
private Vector files;
private String type="file";
/**
* The constructor
*
......@@ -173,5 +173,9 @@ public final class fileIterator implements TIterator {
public final Object nextElement() {
return files.get(index++);
}
public String getType(){
return type;
}
}//end class
......@@ -39,7 +39,7 @@ public final class fixpointIterator implements TIterator {
private Parameters param;
private String name;
private String condition;
private String type="fixpoint";
/**
* The constructor
*
......@@ -96,5 +96,9 @@ public final class fixpointIterator implements TIterator {
String s = "";
return (Object) s;
}
public String getType(){
return type;
}
}//end class
/**
* $Id: integerIterator.java,v 1.5 2002-09-06 06:18:50 triolet Exp $
* $Id: integerIterator.java,v 1.6 2002-11-04 15:23:39 triolet Exp $
*
* Transmorpher
*
......@@ -49,7 +49,7 @@ public final class integerIterator implements TIterator {
private int to = 0;
private boolean down = false;
private String name;
private String type="string";
/**
*The constructor
*/
......@@ -111,5 +111,9 @@ public final class integerIterator implements TIterator {
value = value + incr;
return (Object)String.valueOf(result);
}
public String getType(){
return type;
}
} //end class
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment