| Modifier and Type | Field and Description |
|---|---|
| protected Consumer | |
| private final ListChangeListener | |
| private final ObservableList | |
| private final WeakListChangeListener |
| Access | Constructor and Description |
|---|---|
| public | AbstractChangeTracker(ObservableList<T>
the observable list of elements that is being monitored source)Constructs an AbstractChangeTracker with the provided source list. |
| public | AbstractChangeTracker(ObservableList<T>
the observable list of elements that is being monitored source, Consumer<ObservableList<T>> the consumer to handle change notifications onChanged)Constructs an AbstractChangeTracker with the provided source list and change handler. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected void | |
| protected void | |
| protected abstract void | |
| protected abstract void | |
| public void | setOnChanged(Consumer<ObservableList<T>>
the consumer to be notified of changes onChanged)Sets the consumer that will be notified when changes occur. |
| onChanged | back to summary |
|---|---|
| protected Consumer<ObservableList<T>> onChanged | |
| outerListChangeListener | back to summary |
|---|---|
| private final ListChangeListener<T> outerListChangeListener | |
| source | back to summary |
|---|---|
| private final ObservableList<T> source | |
| weakOuterListChangeListener | back to summary |
|---|---|
| private final WeakListChangeListener<T> weakOuterListChangeListener | |
| AbstractChangeTracker | back to summary |
|---|---|
| public AbstractChangeTracker(ObservableList<T> source) Constructs an AbstractChangeTracker with the provided source list.
| |
| AbstractChangeTracker | back to summary |
|---|---|
| public AbstractChangeTracker(ObservableList<T> source, Consumer<ObservableList<T>> onChanged) Constructs an AbstractChangeTracker with the provided source list and change handler.
| |
| dispose | back to summary |
|---|---|
| public void dispose() Disposes this tracker by removing all listeners from the source and nested lists. It is recommended to call this method when the tracker is no longer needed. Doing so helps ensure that resources are properly released and helps prevent potential memory leaks. Calling this method is particularly important in environments with limited resources or in applications that create and dispose many trackers over their lifetime. | |
| initOuterListener | back to summary |
|---|---|
| protected void initOuterListener() Initializes the listener for the outer list. This method should be called after subclass constructors have fully initialized any necessary fields to ensure that listeners interact with a fully initialized object. | |
| notifyChange | back to summary |
|---|---|
| protected void notifyChange() | |
| safeAddListener | back to summary |
|---|---|
| protected abstract void safeAddListener(T value) | |
| safeRemoveListener | back to summary |
|---|---|
| protected abstract void safeRemoveListener(T value) | |
| setOnChanged | back to summary |
|---|---|
| public void setOnChanged(Consumer<ObservableList<T>> onChanged) Sets the consumer that will be notified when changes occur.
| |