public class ListenableStateRepository extends Object implements StateRepository
| Constructor and Description |
|---|
ListenableStateRepository(StateRepository delegate,
FeatureStateChangedListener... listeners) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFeatureStateChangedListener(FeatureStateChangedListener listener) |
FeatureState |
getFeatureState(Feature feature)
Get the persisted state of a feature from the repository.
|
void |
setFeatureState(FeatureState featureState)
Persist the supplied feature state.
|
public ListenableStateRepository(StateRepository delegate, FeatureStateChangedListener... listeners)
public final void addFeatureStateChangedListener(FeatureStateChangedListener listener)
public FeatureState getFeatureState(Feature feature)
StateRepositorynull.getFeatureState in interface StateRepositoryfeature - The feature to read the state fornullpublic void setFeatureState(FeatureState featureState)
StateRepositoryStateRepository.getFeatureState(Feature) return the same state as persisted using this method.setFeatureState in interface StateRepositoryfeatureState - The feature state to persistCopyright © 2021. All rights reserved.