Package moxy.viewstate.strategy
Interface StateStrategy
-
- All Known Implementing Classes:
AddToEndSingleStrategy,AddToEndSingleTagStrategy,AddToEndStrategy,OneExecutionStateStrategy,SingleStateStrategy,SkipStrategy
public interface StateStrategyCautions:- Don't rearrange current state
- Don't insert commands inside existing current state - only put them to the end of it
- Be careful when you remove commands by another type. If you do it, be sure that inside your view method you've fully overriden the view changes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <View extends MvpView>
voidafterApply(java.util.List<ViewCommand<View>> currentState, ViewCommand<View> incomingCommand)Called immediately after a command was applied to anMvpView.<View extends MvpView>
voidbeforeApply(java.util.List<ViewCommand<View>> currentState, ViewCommand<View> incomingCommand)Called immediately afterMvpViewStatereceives some command.
-
-
-
Method Detail
-
beforeApply
<View extends MvpView> void beforeApply(java.util.List<ViewCommand<View>> currentState, ViewCommand<View> incomingCommand)
Called immediately afterMvpViewStatereceives some command. Will not be called before re-apply to some otherMvpView- Type Parameters:
View- type of the given view- Parameters:
currentState- current state ofMvpViewState. EachViewCommandcontains its own parameters.incomingCommand- command for applying to aMvpViewThisViewCommandcontains params of this command.
-
afterApply
<View extends MvpView> void afterApply(java.util.List<ViewCommand<View>> currentState, ViewCommand<View> incomingCommand)
Called immediately after a command was applied to anMvpView. Also called after re-apply to other views.- Type Parameters:
View- type of the given view- Parameters:
currentState- current state ofMvpViewState. EachViewCommandcontains its own parameters.incomingCommand- applied command toMvpViewThisViewCommandcontains params of this command.
-
-