Skip to content

Commit acca035

Browse files
committed
rename WidgetTree.stream() to WidgetTree.flatStream()
1 parent f5a532e commit acca035

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/cleanroommc/modularui/widget/WidgetTree.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public static boolean foreachChildReverse(IWidget parent, Predicate<IWidget> con
193193
}
194194

195195
/**
196-
* Creates a stream of the whole sub widget tree.
196+
* Creates a flat stream of the whole sub widget tree.
197197
* <p>
198198
* {@link Stream#forEach(Consumer)} on this has slightly worse performance than {@link #foreachChildBFS(IWidget, Predicate, boolean)} on
199199
* small widget trees and has similar performance on large widget trees. The performance is significantly better than
@@ -203,7 +203,7 @@ public static boolean foreachChildReverse(IWidget parent, Predicate<IWidget> con
203203
* @return stream of the sub widget tree
204204
*/
205205
@SuppressWarnings("UnstableApiUsage")
206-
public static Stream<IWidget> stream(IWidget parent) {
206+
public static Stream<IWidget> flatStream(IWidget parent) {
207207
if (!parent.hasChildren()) return Stream.of(parent);
208208
return Streams.stream(iteratorBFS(parent));
209209
}

0 commit comments

Comments
 (0)