working on directto benchmark--removing code like unused constructors that hinder...
[IRC.git] / Robust / src / Benchmarks / mlp / directto / mlp-java / MessageList.java
index a49cb737f3243b438384eafe9d1ddba3f45634f2..2f268cb414a4ff7dc2008aa3e53f0f4c39a511f2 100755 (executable)
@@ -10,12 +10,13 @@ public class MessageList {
 
   public Message data() {
     Message m = (Message) messages.elementAt(0);
-    messages.removeElementAt(0);
     return m;
   }
     
   public Message next() {
-    return data();
+    Message m = (Message) messages.elementAt(0);
+    messages.removeElementAt(0);
+    return m;
   }
 
   public boolean hasNext() {
@@ -23,7 +24,7 @@ public class MessageList {
   }
 
   //is true for DO_WORK
-    public boolean setMessage(String line) {   
+  public boolean setMessage(String line) {     
     if (line.equals(""))
       return false;
 
@@ -48,6 +49,7 @@ public class MessageList {
     System.out.println("executeAll: we have "+messages.size()+" messages.");
     while(hasNext())
       next().executeMessage(d2);     
+
     d2.getStatic().printInfo();
     d2.getFixList().printInfo();
     d2.getAircraftList().printInfo();