From: adam Date: Sun, 16 Jul 2006 07:05:23 +0000 (-0400) Subject: checkpoint X-Git-Tag: tag_for_25-Mar~128 X-Git-Url: http://git.megacz.com/?p=sbp.git;a=commitdiff_plain;h=fd03b595963d781ee0a86961631854d2b0089397 checkpoint darcs-hash:20060716070523-5007d-5f8a263cb08fa99bb644bf68a32a9d234e9d5f74.gz --- diff --git a/src/edu/berkeley/sbp/Forest.java b/src/edu/berkeley/sbp/Forest.java index 3795c9a..0fb10c6 100644 --- a/src/edu/berkeley/sbp/Forest.java +++ b/src/edu/berkeley/sbp/Forest.java @@ -119,7 +119,7 @@ public abstract class Forest implements GraphViz.ToGraphViz { // Many ////////////////////////////////////////////////////////////////////////////// /** An "ambiguity node"; this is immutable once it has been "looked at" */ - public static class Many extends Forest { + public static class Many extends Forest implements Iterable> { HashSet parents = new HashSet(); private FastSet> hp = new FastSet>(); @@ -129,7 +129,7 @@ public abstract class Forest implements GraphViz.ToGraphViz { public Iterator> iterator() { touched(); - return (Iterator>)hp.iterator(); // FIXME: fastset's iterator is not safe! + return (Iterator>)(Object)hp.iterator(); // FIXME: fastset's iterator is not safe! } public Tree expand1() throws Ambiguous { @@ -163,7 +163,7 @@ public abstract class Forest implements GraphViz.ToGraphViz { FastSet> f2 = new FastSet>(); for(Forest f : hp) if (f instanceof Forest.One) f2.add(f); - else for(Forest ff : ((Forest.Many)f)) + else for(Forest ff : ((Forest.Many)f)) f2.add(ff); hp = f2; }