class ToolbarComponentImpl implements ToolbarComponent {

    private final Map<String, ToolbarItem<?>> byKey;
    private final List<ToolbarItem<?>> leftSide;
    private final List<ToolbarItem<?>> rightSide;
    private Injector injector;

    public ToolbarComponentImpl() {
        this.byKey     = new HashMap<>();
        this.leftSide  = new ArrayList<>();
        this.rightSide = new ArrayList<>();
    }

    @ExecuteBefore(INITIALIZED)
    public void setInjector(Injector injector) {
        this.injector = requireNonNull(injector);
    }

    @Override
    public void install(ToolbarItem<Button> item) {
        install(injector.inject(item).createNode().getText(), item);
    }

    @Override
    public <T extends Node> void install(String key, ToolbarItem<T> item) {
        injector.inject(item);
        final ToolbarItem<?> oldItem = byKey.put(key, item);
        if (oldItem == null) {
            switch (item.getSide()) {
                case LEFT:  leftSide.add(item); break;
                case RIGHT: rightSide.add(item); break;
                default: throw new UnsupportedOperationException(format(
                    "Unknown enum constant '%s'.", item.getSide()));
            }
        } else {
            switch (oldItem.getSide()) {
                case LEFT:  leftSide.set(leftSide.indexOf(oldItem), item); break;
                case RIGHT: rightSide.set(rightSide.indexOf(oldItem), item); break;
                default: throw new UnsupportedOperationException(format(
                    "Unknown enum constant '%s'.", item.getSide()));
            }
        }
    }

    @Override
    public void populate(Pane parent) {<FILL_FUNCTION_BODY>}
}

        final ObservableList<Node> children = parent.getChildren();
        children.clear();

        leftSide.stream()
            .map(ToolbarItem::createNode)
            .forEachOrdered(children::add);

        final Pane separator = new Pane();
        separator.setPrefHeight(1);
        HBox.setHgrow(separator, Priority.ALWAYS);
        children.add(separator);

        final ListIterator<ToolbarItem<?>> it = rightSide.listIterator(rightSide.size());
        while (it.hasPrevious()) {
            children.add(it.previous().createNode());
        }
    
<no_super_class>