private static double apply(LeafFirstTraversalNumber visitor, UiEvent event) {
final JsArrayNumber values = JsArrayNumber.createArray().cast();
final JSOArray<UiEvent> children = event.getChildren();
for (int i = 0, n = children.size(); i < n; ++i) {
values.push(apply(visitor, children.get(i)));
}
return visitor.visit(event, values);
}
private static void apply(LeafFirstTraversalVoid visitor, UiEvent event) {