public TreeDataProvider(TreeItems<T> treeItems, TreeSourceEventsDelegate<T> eventsDelegate) { this.treeItems = treeItems; this.eventsDelegate = eventsDelegate; this.itemSetChangeSubscription = this.treeItems.addItemSetChangeListener(this::datasourceItemSetChanged); this.valueChangeSubscription = this.treeItems.addValueChangeListener(this::datasourceValueChanged); this.stateChangeSubscription = this.treeItems.addStateChangeListener(this::datasourceStateChanged); this.selectedItemChangeSubscription = this.treeItems.addSelectedItemChangeListener(this::datasourceSelectedItemChanged); }