checkpoint
[sbp.git] / src / edu / berkeley / sbp / Sequence.java
index 091f7ae..31d8f29 100644 (file)
@@ -50,14 +50,8 @@ public abstract class Sequence extends Element implements Iterable<Element> {
 
     ////////////////////////////////////////////////////////////////////////////////
 
-    public Element follow = null;
-    public final Topology follow() { return follow==null ? null : Atom.toAtom(follow); }
-
-    Topology toAtom() {
-        if (elements.length!=1)
-            throw new RuntimeException("cannot invoke toAtom() on a Sequence with " + elements.length + " elements: " + this);
-        return Atom.toAtom(elements[0]);
-    }
+    public Atom follow = null;
+    public final Topology follow() { return follow; }
 
     public Sequence and(Sequence s) { Sequence ret = dup(); ret.needs.add(s); s.needed.add(ret); return ret; }
     public Sequence not(Sequence s) { Sequence ret = dup(); ret.hates.add(s); s.hated.add(ret); return ret; }