I sometimes stumble upon a decision for method naming on public API methods.
Variant A:
public void play();
public void stop();
public void pause();
Variant B:
public enum CallType {
PLAY,
STOP,
PAUSE
}
public void execute(CallType type);
I think for the API client it is more convenient to have interface of variant A, since no parameter(and checking!) is needed.
But I also think with variant B the public interface is also smaller and the task for the developer is easier.
What is your opinion about these approaches?