class ChoiceBoxItem<T> extends AbstractLabelTooltipItem {

    private final Property<T> currentValue;
    private final ObservableList<T> alternatives;

    /**
     * Creates a new ChoiceBoxItem.
     * <p>
     * The default choice will either be the first choice alternative, or the
     * alternative matching the current value of the property (if such as
     * alternative exists). Alternatives will get their name by calling toString()
     * on the objects in the list of alternatives
     * <p>
     * The property will bind to the ChoiceBox.valueProperty().
     *
     * @param label         the label text
     * @param value         the property
     * @param alternatives  list of alternatives in the choice box
     * @param tooltip       the tooltip
     */
    public ChoiceBoxItem(
            String label, 
            Property<T> value, 
            ObservableList<T> alternatives, 
            String tooltip) {
        this(label, value, alternatives, tooltip, NO_DECORATOR);
    }
    
    /**
     * Creates a new ChoiceBoxItem.
     * <p>
     * The default choice will either be the first choice alternative, or the
     * alternative matching the current value of the property (if such as
     * alternative exists). Alternatives will get their name by calling toString()
     * on the objects in the list of alternatives
     * <p>
     * The property will bind to the ChoiceBox.valueProperty().
     *
     * @param label         the label text
     * @param value         the property
     * @param alternatives  list of alternatives in the choice box
     * @param tooltip       the tooltip
     * @param decorator     the editor decorator
     */
    public ChoiceBoxItem(
            String label, 
            Property<T> value, 
            ObservableList<T> alternatives, 
            String tooltip,
            UnaryOperator<Node> decorator) {
        
        super(label, tooltip, decorator);
        this.currentValue = value;
        this.alternatives = FXCollections.unmodifiableObservableList(alternatives);
    }

    @Override
    protected Node createUndecoratedEditor() {<FILL_FUNCTION_BODY>}
}

        final ChoiceBox<T> box = new ChoiceBox<>(alternatives);
        final T val = currentValue.getValue();

        if (alternatives.contains(val)) {
            box.setValue(val);
        } else {
            box.setValue(alternatives.get(0));
        }

        currentValue.bindBidirectional(box.valueProperty());
        return box;
    
<methods>public final javafx.scene.Node createEditor() ,public javafx.scene.Node createLabel() ,public final void onRemove() <variables>protected static final UnaryOperator<javafx.scene.Node> NO_DECORATOR,private final non-sealed UnaryOperator<javafx.scene.Node> editorDecorator,private final non-sealed java.lang.String label,private final non-sealed Map<ObservableValue<java.lang.Object>,ChangeListener<java.lang.Object>> listeners,private final non-sealed java.lang.String tooltip