TreeModel (Supplier<? extends TreeNode> supplier, long delay, boolean showLoadingNode, Invoker invoker) { TreeModel model = new DefaultTreeModel(supplier.get()); if (delay > 0) { model = new Wrapper.WithDelay(model, delay); } if (invoker != null) { model = new Wrapper.WithInvoker(model, invoker); model = new AsyncTreeModel(model, showLoadingNode, invoker); } return model; }