![JAR search and dependency download from the Maven repository](/logo.png)
com.arellomobile.mvp.viewstate.strategy.StateStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moxy-x Show documentation
Show all versions of moxy-x Show documentation
MoxyX, we added X for make this librayr coolest
package com.arellomobile.mvp.viewstate.strategy;
import com.arellomobile.mvp.MvpView;
import com.arellomobile.mvp.viewstate.ViewCommand;
import java.util.List;
/**
* Cautions:
*
* - Don't rearrange current state
* - Don't insert commands inside existing current state - only put to end of it
* - Be careful if remove commands by another type. If you make it, be sure that inside your view method you fully override view changes
*
*
* Date: 17.12.2015
* Time: 11:21
*
* @author Yuri Shmakov
*/
public interface StateStrategy {
/**
* Called immediately after
* {@link com.arellomobile.mvp.viewstate.MvpViewState} receive some
* command. Will not be called before re-apply to some other
* {@link MvpView}
*
* @param currentState current state of
* {@link com.arellomobile.mvp.viewstate.MvpViewState}. Each {@link ViewCommand}
* contains self parameters.
* @param incomingCommand command for apply to {@link MvpView} This
* {@link ViewCommand} contains params of this command.
* @param type of incoming view
*/
void beforeApply(List> currentState, ViewCommand incomingCommand);
/**
* Called immediately after command applied to {@link MvpView}. Also called
* after re-apply to other views.
*
* @param currentState current state of
* {@link com.arellomobile.mvp.viewstate.MvpViewState}. Each {@link ViewCommand}
* contains self parameters.
* @param incomingCommand applied command to {@link MvpView} This
* {@link ViewCommand} contains params of this command.
* @param type of incoming view
*/
void afterApply(List> currentState, ViewCommand incomingCommand);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy