+public abstract class Forest<T> /*extends PrintableTree<Forest.Body<T>>*/ implements Visitable<Forest.Body<T>>, Iterable<Forest.Body<T>> {
+
+ public abstract <B,C> void invoke(Invokable<Forest.Body<T>,B,C> ivbc, B b, C c);
+ private static class TreeMaker<T> extends HashSet<Tree<T>> implements Invokable<Forest.Body<T>,Boolean,Integer> {
+ public ArrayList<Tree<T>> toks = new ArrayList<Tree<T>>();
+ public void invoke(Forest.Body<T> bod, Boolean toss, Integer i) {
+ if (i==null) {
+ addAll(bod.expand(toss, 0, new TreeMaker<T>()));
+ } else {
+ bod.expand(toss, i, this);
+ }
+ }
+ }