Package moxy.viewstate.strategy
Class AddToEndSingleTagStrategy
- java.lang.Object
-
- moxy.viewstate.strategy.AddToEndSingleTagStrategy
-
- All Implemented Interfaces:
StateStrategy
public class AddToEndSingleTagStrategy extends java.lang.Object implements StateStrategy
Command will be added to the end of the commands queue. If the commands queue contains the same tag, then an existing command will be removed.
-
-
Constructor Summary
Constructors Constructor Description AddToEndSingleTagStrategy()
-
Method Summary
All Methods Instance Methods Concrete 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
public <View extends MvpView> void beforeApply(java.util.List<ViewCommand<View>> currentState, ViewCommand<View> incomingCommand)
Description copied from interface:StateStrategyCalled immediately afterMvpViewStatereceives some command. Will not be called before re-apply to some otherMvpView- Specified by:
beforeApplyin interfaceStateStrategy- 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
public <View extends MvpView> void afterApply(java.util.List<ViewCommand<View>> currentState, ViewCommand<View> incomingCommand)
Description copied from interface:StateStrategyCalled immediately after a command was applied to anMvpView. Also called after re-apply to other views.- Specified by:
afterApplyin interfaceStateStrategy- 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.
-
-