Ejemplo n.º 1
0
 public PropagationHistory next() {
   String description = null;
   Vector<ArcWithTimestamp> propagations = new Vector<ArcWithTimestamp>();
   if (nextLine != null) { // we found an @ meme line or tab
     if (nextLine.startsWith("@")) {
       description = nextLine.substring(1).trim();
     } else {
       propagations.add(new ArcWithTimestamp(nextLine));
     }
     nextLine = null;
   }
   while (lineIterator.hasNext()) {
     String str = lineIterator.next().toString();
     if (str.startsWith("#")) {
       continue;
     }
     if (str.startsWith("@")) {
       if (propagations.size() > 0) {
         nextLine = str;
         return new PropagationHistory(description, propagations);
       } else {
         description = str.substring(1).trim();
         continue;
       }
     }
     if (str.startsWith("\t") && propagations.size() > 0) {
       nextLine = str;
       return new PropagationHistory(description, propagations);
     }
     propagations.add(new ArcWithTimestamp(str));
   }
   return new PropagationHistory(description, propagations);
 }
Ejemplo n.º 2
0
 public boolean hasNext() {
   return lineIterator.hasNext() || (nextLine != null);
 }