From fd03b595963d781ee0a86961631854d2b0089397 Mon Sep 17 00:00:00 2001 From: adam Date: Sun, 16 Jul 2006 03:05:23 -0400 Subject: [PATCH] checkpoint darcs-hash:20060716070523-5007d-5f8a263cb08fa99bb644bf68a32a9d234e9d5f74.gz --- src/edu/berkeley/sbp/Forest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 1.7.10.4