projects
/
sbp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkpoint
[sbp.git]
/
src
/
edu
/
berkeley
/
sbp
/
Forest.java
diff --git
a/src/edu/berkeley/sbp/Forest.java
b/src/edu/berkeley/sbp/Forest.java
index
cdf8a8b
..
4d8b34f
100644
(file)
--- a/
src/edu/berkeley/sbp/Forest.java
+++ b/
src/edu/berkeley/sbp/Forest.java
@@
-20,11
+20,14
@@
public abstract class Forest<T> implements GraphViz.ToGraphViz {
/** expand this forest into a set of trees */
public void expand(HashSet<Tree<T>> ht) { expand(ht, new HashSet<Forest<T>>(), null); }
/** expand this forest into a set of trees */
public void expand(HashSet<Tree<T>> ht) { expand(ht, new HashSet<Forest<T>>(), null); }
- /** create a new forest */
- public static <T> Forest<T> create(Input.Region loc, T head, Forest<T>[] children, boolean lift) {
+ static <T> Forest<T> create(Input.Region loc, T head, Forest<T>[] children, boolean lift) {
return new One<T>(loc, head, children, lift);
}
return new One<T>(loc, head, children, lift);
}
+ /** create a new forest */
+ public static <T> Forest<T> create(Input.Region loc, T head, Forest<T>[] children) {
+ return Forest.create(loc, head, children, false); }
+
// Package-Private //////////////////////////////////////////////////////////////////////////////
abstract void expand(HashSet<Tree<T>> ht, HashSet<Forest<T>> ignore, Tree<T> bogus);
// Package-Private //////////////////////////////////////////////////////////////////////////////
abstract void expand(HashSet<Tree<T>> ht, HashSet<Forest<T>> ignore, Tree<T> bogus);