@PublicSpi
public interface UpdateChecker
An implementor of this interface checks for an external change that may affect a built forest fragment. It checks for changes those happened after the forest fragment had been generated.
Here is a basic implementation:
state = collectState(); // Collect whatever is required to build a forest // Generate a forest based on the state context.addUpdateChecker(() -> !state.equals(collectState())); // If something has changed, the Structure has to regenerate the forest
If the forest fragment depends only on items those changes are reported to ItemTracker
you may consider to addItemChangeFilter
.
Modifier and Type | Method and Description |
---|---|
boolean |
hasUpdate()
Checks if there is any change that affects a generated forest fragment.
|
Copyright © 2024 Tempo Software. All Rights Reserved.