Interface StateStrategy

    • Method Detail

      • beforeApply

        <View extends MvpView> void beforeApply​(java.util.List<ViewCommand<View>> currentState,
                                                ViewCommand<View> incomingCommand)
        Called immediately after MvpViewState receives some command. Will not be called before re-apply to some other MvpView
        Type Parameters:
        View - type of the given view
        Parameters:
        currentState - current state of MvpViewState. Each ViewCommand contains its own parameters.
        incomingCommand - command for applying to a MvpView This ViewCommand contains 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 an MvpView. Also called after re-apply to other views.
        Type Parameters:
        View - type of the given view
        Parameters:
        currentState - current state of MvpViewState. Each ViewCommand contains its own parameters.
        incomingCommand - applied command to MvpView This ViewCommand contains params of this command.