Skip to content

Instantly share code, notes, and snippets.

@senneco
Created February 10, 2017 09:01
Show Gist options
  • Save senneco/61cb8d876ffd30d97e5d075b0512040c to your computer and use it in GitHub Desktop.
Save senneco/61cb8d876ffd30d97e5d075b0512040c to your computer and use it in GitHub Desktop.
public abstract class ViewCommand<View extends MvpView> {
private final String mTag;
private final Class<? extends StateStrategy> mStateStrategyType;
protected ViewCommand(String tag) {
this(tag, MvpFacade.getDefaultStrategyClass());
}
protected ViewCommand(String tag, Class<? extends StateStrategy> stateStrategyType) {
mTag = tag;
mStateStrategyType = stateStrategyType;
}
public abstract void apply(View view);
public String getTag() {
return mTag;
}
public Class<? extends StateStrategy> getStrategyType() {
return mStateStrategyType;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment