foldChildren

public T foldChildren<T>(T initial, @NotNull() @NotNull() BiFunction<@NotNull() GuiComponent, T, T> visitor)(source)

Walk over the direct children of this element. A gui element that composites other gui elements should override this method. By default, the initial element is returned without change.

Parameters

visitor

a consumer to be called for all children for this element.

initial

an initial value to be given to the function