S - The concrete type of the state object.public interface StateObserver<S extends State>
| Modifier and Type | Method and Description |
|---|---|
S |
getCurrentState()
Returns the current state.
|
void |
subscribe(OnStateChanged<S> subscriber)
Subscribe to when the state changes.
|
void |
unsubscribe(OnStateChanged<S> subscriber)
Remove previously added subscriber.
|
S getCurrentState()
void subscribe(OnStateChanged<S> subscriber)
subscriber - The subscriber to notify when the state changes.void unsubscribe(OnStateChanged<S> subscriber)
subscriber - The subscriber to remove.Copyright © 2016 Cooking Fox. All rights reserved.